aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/arm/translate.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/target/arm/translate.c b/target/arm/translate.c
index b0d32ff8c9..a39f792463 100644
--- a/target/arm/translate.c
+++ b/target/arm/translate.c
@@ -9742,13 +9742,11 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
/* Load. */
tmp = tcg_temp_new_i32();
gen_aa32_ld32u(s, tmp, addr, get_mem_index(s));
- if (i == 15) {
- gen_bx_excret(s, tmp);
- } else if (i == rn) {
+ if (i == rn) {
loaded_var = tmp;
loaded_base = 1;
} else {
- store_reg(s, i, tmp);
+ store_reg_from_load(s, i, tmp);
}
} else {
/* Store. */
@@ -10889,11 +10887,7 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
tcg_temp_free_i32(addr);
goto illegal_op;
}
- if (rs == 15) {
- gen_bx_excret(s, tmp);
- } else {
- store_reg(s, rs, tmp);
- }
+ store_reg_from_load(s, rs, tmp);
} else {
/* Store. */
tmp = load_reg(s, rs);