mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-29 21:12:07 -06:00
target/arm: Use tcg_constant for op_s_{rri,rxi}_rot
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220426163043.100432-29-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
cca8046259
commit
dfe36d24aa
1 changed files with 5 additions and 6 deletions
|
@ -5495,18 +5495,16 @@ static bool op_s_rri_rot(DisasContext *s, arg_s_rri_rot *a,
|
||||||
void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32),
|
void (*gen)(TCGv_i32, TCGv_i32, TCGv_i32),
|
||||||
int logic_cc, StoreRegKind kind)
|
int logic_cc, StoreRegKind kind)
|
||||||
{
|
{
|
||||||
TCGv_i32 tmp1, tmp2;
|
TCGv_i32 tmp1;
|
||||||
uint32_t imm;
|
uint32_t imm;
|
||||||
|
|
||||||
imm = ror32(a->imm, a->rot);
|
imm = ror32(a->imm, a->rot);
|
||||||
if (logic_cc && a->rot) {
|
if (logic_cc && a->rot) {
|
||||||
tcg_gen_movi_i32(cpu_CF, imm >> 31);
|
tcg_gen_movi_i32(cpu_CF, imm >> 31);
|
||||||
}
|
}
|
||||||
tmp2 = tcg_const_i32(imm);
|
|
||||||
tmp1 = load_reg(s, a->rn);
|
tmp1 = load_reg(s, a->rn);
|
||||||
|
|
||||||
gen(tmp1, tmp1, tmp2);
|
gen(tmp1, tmp1, tcg_constant_i32(imm));
|
||||||
tcg_temp_free_i32(tmp2);
|
|
||||||
|
|
||||||
if (logic_cc) {
|
if (logic_cc) {
|
||||||
gen_logic_CC(tmp1);
|
gen_logic_CC(tmp1);
|
||||||
|
@ -5525,9 +5523,10 @@ static bool op_s_rxi_rot(DisasContext *s, arg_s_rri_rot *a,
|
||||||
if (logic_cc && a->rot) {
|
if (logic_cc && a->rot) {
|
||||||
tcg_gen_movi_i32(cpu_CF, imm >> 31);
|
tcg_gen_movi_i32(cpu_CF, imm >> 31);
|
||||||
}
|
}
|
||||||
tmp = tcg_const_i32(imm);
|
|
||||||
|
|
||||||
gen(tmp, tmp);
|
tmp = tcg_temp_new_i32();
|
||||||
|
gen(tmp, tcg_constant_i32(imm));
|
||||||
|
|
||||||
if (logic_cc) {
|
if (logic_cc) {
|
||||||
gen_logic_CC(tmp);
|
gen_logic_CC(tmp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue