mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-14 14:56:05 -06:00
target/arm: Use tcg_gen_addcio_* for ADCS
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>
This commit is contained in:
parent
db3feb02b8
commit
eea0f7ea51
2 changed files with 5 additions and 20 deletions
|
|
@ -1076,11 +1076,9 @@ static void gen_adc_CC(int sf, TCGv_i64 dest, TCGv_i64 t0, TCGv_i64 t1)
|
|||
TCGv_i64 cf_64 = tcg_temp_new_i64();
|
||||
TCGv_i64 vf_64 = tcg_temp_new_i64();
|
||||
TCGv_i64 tmp = tcg_temp_new_i64();
|
||||
TCGv_i64 zero = tcg_constant_i64(0);
|
||||
|
||||
tcg_gen_extu_i32_i64(cf_64, cpu_CF);
|
||||
tcg_gen_add2_i64(result, cf_64, t0, zero, cf_64, zero);
|
||||
tcg_gen_add2_i64(result, cf_64, result, cf_64, t1, zero);
|
||||
tcg_gen_addcio_i64(result, cf_64, t0, t1, cf_64);
|
||||
tcg_gen_extrl_i64_i32(cpu_CF, cf_64);
|
||||
gen_set_NZ64(result);
|
||||
|
||||
|
|
@ -1094,12 +1092,10 @@ static void gen_adc_CC(int sf, TCGv_i64 dest, TCGv_i64 t0, TCGv_i64 t1)
|
|||
TCGv_i32 t0_32 = tcg_temp_new_i32();
|
||||
TCGv_i32 t1_32 = tcg_temp_new_i32();
|
||||
TCGv_i32 tmp = tcg_temp_new_i32();
|
||||
TCGv_i32 zero = tcg_constant_i32(0);
|
||||
|
||||
tcg_gen_extrl_i64_i32(t0_32, t0);
|
||||
tcg_gen_extrl_i64_i32(t1_32, t1);
|
||||
tcg_gen_add2_i32(cpu_NF, cpu_CF, t0_32, zero, cpu_CF, zero);
|
||||
tcg_gen_add2_i32(cpu_NF, cpu_CF, cpu_NF, cpu_CF, t1_32, zero);
|
||||
tcg_gen_addcio_i32(cpu_NF, cpu_CF, t0_32, t1_32, cpu_CF);
|
||||
|
||||
tcg_gen_mov_i32(cpu_ZF, cpu_NF);
|
||||
tcg_gen_xor_i32(cpu_VF, cpu_NF, t0_32);
|
||||
|
|
|
|||
|
|
@ -494,20 +494,9 @@ static void gen_add_CC(TCGv_i32 dest, TCGv_i32 t0, TCGv_i32 t1)
|
|||
static void gen_adc_CC(TCGv_i32 dest, TCGv_i32 t0, TCGv_i32 t1)
|
||||
{
|
||||
TCGv_i32 tmp = tcg_temp_new_i32();
|
||||
if (tcg_op_supported(INDEX_op_add2_i32, TCG_TYPE_I32, 0)) {
|
||||
tcg_gen_movi_i32(tmp, 0);
|
||||
tcg_gen_add2_i32(cpu_NF, cpu_CF, t0, tmp, cpu_CF, tmp);
|
||||
tcg_gen_add2_i32(cpu_NF, cpu_CF, cpu_NF, cpu_CF, t1, tmp);
|
||||
} else {
|
||||
TCGv_i64 q0 = tcg_temp_new_i64();
|
||||
TCGv_i64 q1 = tcg_temp_new_i64();
|
||||
tcg_gen_extu_i32_i64(q0, t0);
|
||||
tcg_gen_extu_i32_i64(q1, t1);
|
||||
tcg_gen_add_i64(q0, q0, q1);
|
||||
tcg_gen_extu_i32_i64(q1, cpu_CF);
|
||||
tcg_gen_add_i64(q0, q0, q1);
|
||||
tcg_gen_extr_i64_i32(cpu_NF, cpu_CF, q0);
|
||||
}
|
||||
|
||||
tcg_gen_addcio_i32(cpu_NF, cpu_CF, t0, t1, cpu_CF);
|
||||
|
||||
tcg_gen_mov_i32(cpu_ZF, cpu_NF);
|
||||
tcg_gen_xor_i32(cpu_VF, cpu_NF, t0);
|
||||
tcg_gen_xor_i32(tmp, t0, t1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue