target/arm: Fix PC test for LDM (exception return)
PATCH 1/1 target/arm: Fix PC test for LDM (exception return)
Found by inspection: Rn is the base register against which the load began; I is the register within the mask being processed. The exception return should of course be procesed from the loaded PC.
--- target/arm/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/arm/translate.c +1 -1
@@ -10612,7 +10612,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) }else if (i == rn) { loaded_var = tmp; loaded_base =1 ; - }else if (rn ==15 && exc_return) { + }else if (i ==15 && exc_return) {store_pc_exc_ret (s, tmp); }else {store_reg_from_load (s, i, tmp);
Signature · 1 line
2.17.2
Quoted 3 lines · Richard Henderson
Found by inspection: Rn is the base register against which the load began; I is the register within the mask being processed. The exception return should of course be procesed from the loaded PC.
"processed"
Quoted 12 lines
Signed-off-by Richard Henderson <[email protected]>--- target/arm/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/arm/translate.c +0
-0
target/arm/translate.c static void disas_arm_insn(DisasContext *s, unsigned int insn) · line 10618
Quoted 8 lines
target/arm/translate.c +1
-1@@ -10612,7 +10612,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) }else if (i == rn) { loaded_var = tmp; loaded_base =1 ; - }else if (rn ==15 && exc_return) { + }else if (i ==15 && exc_return) {store_pc_exc_ret (s, tmp); }else {store_reg_from_load (s, i, tmp);
Peter Maydell
AppliedQuoted 14 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Richard Henderson
Found by inspection: Rn is the base register against which the load began; I is the register within the mask being processed. The exception return should of course be procesed from the loaded PC.
"processed"
Quoted 6 lines
Signed-off-by Richard Henderson <[email protected]>--- target/arm/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
target/arm/translate.c +0
-0target/arm/translate.c static void disas_arm_insn(DisasContext *s, unsigned int insn) · line 10618
Quoted 8 lines
target/arm/translate.c +1
-1@@ -10612,7 +10612,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) }else if (i == rn) { loaded_var = tmp; loaded_base =1 ; - }else if (rn ==15 && exc_return) { + }else if (i ==15 && exc_return) {store_pc_exc_ret (s, tmp); }else {store_reg_from_load (s, i, tmp);Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Applied to target-arm.next (with the typo fixed), thanks.
-- PMM