diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-08-05 17:36:02 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-08-24 11:22:42 -0700 |
commit | 64919f710f3547e59e56089e91e4cbe0c623a6af (patch) | |
tree | f0da2d6bdd15c5c291e420c9fb13bb74cac6d1bb /target/m68k/translate.c | |
parent | e79f81421b78c4329d54a895b96d74a88d055968 (diff) | |
download | qemu-64919f710f3547e59e56089e91e4cbe0c623a6af.zip qemu-64919f710f3547e59e56089e91e4cbe0c623a6af.tar.gz qemu-64919f710f3547e59e56089e91e4cbe0c623a6af.tar.bz2 |
target/m68k: Use tcg_gen_deposit_i32 in gen_partset_reg
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/m68k/translate.c')
-rw-r--r-- | target/m68k/translate.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c index e07161d..d08e823 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -697,19 +697,12 @@ static inline int ext_opsize(int ext, int pos) */ static void gen_partset_reg(int opsize, TCGv reg, TCGv val) { - TCGv tmp; switch (opsize) { case OS_BYTE: - tcg_gen_andi_i32(reg, reg, 0xffffff00); - tmp = tcg_temp_new(); - tcg_gen_ext8u_i32(tmp, val); - tcg_gen_or_i32(reg, reg, tmp); + tcg_gen_deposit_i32(reg, reg, val, 0, 8); break; case OS_WORD: - tcg_gen_andi_i32(reg, reg, 0xffff0000); - tmp = tcg_temp_new(); - tcg_gen_ext16u_i32(tmp, val); - tcg_gen_or_i32(reg, reg, tmp); + tcg_gen_deposit_i32(reg, reg, val, 0, 16); break; case OS_LONG: case OS_SINGLE: |