mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
target/arm: Use tcg_constant in disas_movw_imm
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220426163043.100432-13-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
2e9917194d
commit
12f1d809e6
1 changed files with 1 additions and 4 deletions
|
@ -4419,7 +4419,6 @@ static void disas_movw_imm(DisasContext *s, uint32_t insn)
|
||||||
int opc = extract32(insn, 29, 2);
|
int opc = extract32(insn, 29, 2);
|
||||||
int pos = extract32(insn, 21, 2) << 4;
|
int pos = extract32(insn, 21, 2) << 4;
|
||||||
TCGv_i64 tcg_rd = cpu_reg(s, rd);
|
TCGv_i64 tcg_rd = cpu_reg(s, rd);
|
||||||
TCGv_i64 tcg_imm;
|
|
||||||
|
|
||||||
if (!sf && (pos >= 32)) {
|
if (!sf && (pos >= 32)) {
|
||||||
unallocated_encoding(s);
|
unallocated_encoding(s);
|
||||||
|
@ -4439,9 +4438,7 @@ static void disas_movw_imm(DisasContext *s, uint32_t insn)
|
||||||
tcg_gen_movi_i64(tcg_rd, imm);
|
tcg_gen_movi_i64(tcg_rd, imm);
|
||||||
break;
|
break;
|
||||||
case 3: /* MOVK */
|
case 3: /* MOVK */
|
||||||
tcg_imm = tcg_const_i64(imm);
|
tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_constant_i64(imm), pos, 16);
|
||||||
tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_imm, pos, 16);
|
|
||||||
tcg_temp_free_i64(tcg_imm);
|
|
||||||
if (!sf) {
|
if (!sf) {
|
||||||
tcg_gen_ext32u_i64(tcg_rd, tcg_rd);
|
tcg_gen_ext32u_i64(tcg_rd, tcg_rd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue