diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-01-18 01:47:53 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-28 13:40:17 -0700 |
commit | fcfbd8f4a9c3cbc09376230093d28e14acf7854b (patch) | |
tree | ee1ed0a4e9acae7f374a43419bdc95b8b8a710e1 | |
parent | 14e9ff8514bcae95d45dc8603f1ef33ad2f1dce1 (diff) | |
download | qemu-fcfbd8f4a9c3cbc09376230093d28e14acf7854b.zip qemu-fcfbd8f4a9c3cbc09376230093d28e14acf7854b.tar.gz qemu-fcfbd8f4a9c3cbc09376230093d28e14acf7854b.tar.bz2 |
target/microblaze: Use tcg_gen_addcio_i32
Use this in gen_addc and gen_rsubc, both of which need
add with carry-in and carry-out.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r-- | target/microblaze/translate.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 7dcad6c..23f1037 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -311,11 +311,7 @@ static void gen_add(TCGv_i32 out, TCGv_i32 ina, TCGv_i32 inb) /* Input and output carry. */ static void gen_addc(TCGv_i32 out, TCGv_i32 ina, TCGv_i32 inb) { - TCGv_i32 zero = tcg_constant_i32(0); - TCGv_i32 tmp = tcg_temp_new_i32(); - - tcg_gen_add2_i32(tmp, cpu_msr_c, ina, zero, cpu_msr_c, zero); - tcg_gen_add2_i32(out, cpu_msr_c, tmp, cpu_msr_c, inb, zero); + tcg_gen_addcio_i32(out, cpu_msr_c, ina, inb, cpu_msr_c); } /* Input carry, but no output carry. */ @@ -544,12 +540,10 @@ static void gen_rsub(TCGv_i32 out, TCGv_i32 ina, TCGv_i32 inb) /* Input and output carry. */ static void gen_rsubc(TCGv_i32 out, TCGv_i32 ina, TCGv_i32 inb) { - TCGv_i32 zero = tcg_constant_i32(0); TCGv_i32 tmp = tcg_temp_new_i32(); tcg_gen_not_i32(tmp, ina); - tcg_gen_add2_i32(tmp, cpu_msr_c, tmp, zero, cpu_msr_c, zero); - tcg_gen_add2_i32(out, cpu_msr_c, tmp, cpu_msr_c, inb, zero); + tcg_gen_addcio_i32(out, cpu_msr_c, tmp, inb, cpu_msr_c); } /* No input or output carry. */ |