target/ppc: Use tcg_gen_abs_i32
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20190423102145.14812-2-f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
73f671f1a2
commit
d577dbaac7
|
@ -126,19 +126,7 @@ static inline void gen_##name(DisasContext *ctx) \
|
|||
tcg_temp_free_i32(t0); \
|
||||
}
|
||||
|
||||
static inline void gen_op_evabs(TCGv_i32 ret, TCGv_i32 arg1)
|
||||
{
|
||||
TCGLabel *l1 = gen_new_label();
|
||||
TCGLabel *l2 = gen_new_label();
|
||||
|
||||
tcg_gen_brcondi_i32(TCG_COND_GE, arg1, 0, l1);
|
||||
tcg_gen_neg_i32(ret, arg1);
|
||||
tcg_gen_br(l2);
|
||||
gen_set_label(l1);
|
||||
tcg_gen_mov_i32(ret, arg1);
|
||||
gen_set_label(l2);
|
||||
}
|
||||
GEN_SPEOP_ARITH1(evabs, gen_op_evabs);
|
||||
GEN_SPEOP_ARITH1(evabs, tcg_gen_abs_i32);
|
||||
GEN_SPEOP_ARITH1(evneg, tcg_gen_neg_i32);
|
||||
GEN_SPEOP_ARITH1(evextsb, tcg_gen_ext8s_i32);
|
||||
GEN_SPEOP_ARITH1(evextsh, tcg_gen_ext16s_i32);
|
||||
|
|
Loading…
Reference in a new issue