mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/arm: Use tcg_constant in LDM, STM
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220426163043.100432-33-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
38ca784f7c
commit
84d6f34364
1 changed files with 4 additions and 8 deletions
|
@ -8050,7 +8050,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n)
|
||||||
{
|
{
|
||||||
int i, j, n, list, mem_idx;
|
int i, j, n, list, mem_idx;
|
||||||
bool user = a->u;
|
bool user = a->u;
|
||||||
TCGv_i32 addr, tmp, tmp2;
|
TCGv_i32 addr, tmp;
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
/* STM (user) */
|
/* STM (user) */
|
||||||
|
@ -8080,9 +8080,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n)
|
||||||
|
|
||||||
if (user && i != 15) {
|
if (user && i != 15) {
|
||||||
tmp = tcg_temp_new_i32();
|
tmp = tcg_temp_new_i32();
|
||||||
tmp2 = tcg_const_i32(i);
|
gen_helper_get_user_reg(tmp, cpu_env, tcg_constant_i32(i));
|
||||||
gen_helper_get_user_reg(tmp, cpu_env, tmp2);
|
|
||||||
tcg_temp_free_i32(tmp2);
|
|
||||||
} else {
|
} else {
|
||||||
tmp = load_reg(s, i);
|
tmp = load_reg(s, i);
|
||||||
}
|
}
|
||||||
|
@ -8123,7 +8121,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n)
|
||||||
bool loaded_base;
|
bool loaded_base;
|
||||||
bool user = a->u;
|
bool user = a->u;
|
||||||
bool exc_return = false;
|
bool exc_return = false;
|
||||||
TCGv_i32 addr, tmp, tmp2, loaded_var;
|
TCGv_i32 addr, tmp, loaded_var;
|
||||||
|
|
||||||
if (user) {
|
if (user) {
|
||||||
/* LDM (user), LDM (exception return) */
|
/* LDM (user), LDM (exception return) */
|
||||||
|
@ -8166,9 +8164,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n)
|
||||||
tmp = tcg_temp_new_i32();
|
tmp = tcg_temp_new_i32();
|
||||||
gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN);
|
gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN);
|
||||||
if (user) {
|
if (user) {
|
||||||
tmp2 = tcg_const_i32(i);
|
gen_helper_set_user_reg(cpu_env, tcg_constant_i32(i), tmp);
|
||||||
gen_helper_set_user_reg(cpu_env, tmp2, tmp);
|
|
||||||
tcg_temp_free_i32(tmp2);
|
|
||||||
tcg_temp_free_i32(tmp);
|
tcg_temp_free_i32(tmp);
|
||||||
} else if (i == a->rn) {
|
} else if (i == a->rn) {
|
||||||
loaded_var = tmp;
|
loaded_var = tmp;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue