Skip to content

Commit e60bbda

Browse files
haukeMichael Tokarev
authored andcommitted
target/mips: Fix MIPS16e translation
Fix a wrong conversion to gen_op_addr_addi(). The framesize should be added like it was done before. This bug broke booting OpenWrt MIPS32 BE malta Linux system images generated by OpenWrt. Cc: [email protected] Fixes: d0b24b7 ("target/mips: Use gen_op_addr_addi() when possible") Signed-off-by: Hauke Mehrtens <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> (cherry picked from commit d4a785b) Signed-off-by: Michael Tokarev <[email protected]>
1 parent dbbb444 commit e60bbda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

target/mips/tcg/mips16e_translate.c.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static void gen_mips16_restore(DisasContext *ctx,
306306
int astatic;
307307
TCGv t0 = tcg_temp_new();
308308

309-
gen_op_addr_addi(ctx, t0, cpu_gpr[29], -framesize);
309+
gen_op_addr_addi(ctx, t0, cpu_gpr[29], framesize);
310310

311311
if (do_ra) {
312312
decr_and_load(ctx, 31, t0);
@@ -386,7 +386,7 @@ static void gen_mips16_restore(DisasContext *ctx,
386386
}
387387
}
388388

389-
gen_op_addr_addi(ctx, cpu_gpr[29], cpu_gpr[29], -framesize);
389+
gen_op_addr_addi(ctx, cpu_gpr[29], cpu_gpr[29], framesize);
390390
}
391391

392392
#if defined(TARGET_MIPS64)

0 commit comments

Comments
 (0)