mirror of
https://github.com/qemu/qemu.git
synced 2024-12-12 13:13:51 +08:00
target/rx: Use tcg_gen_abs_i32
Remove the local definition of rx_abs. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
c3be8116d9
commit
4b01ff2561
@ -1126,21 +1126,11 @@ static bool trans_SBB_mr(DisasContext *ctx, arg_SBB_mr *a)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void rx_abs(TCGv ret, TCGv arg1)
|
||||
{
|
||||
TCGv neg;
|
||||
TCGv zero;
|
||||
neg = tcg_temp_new();
|
||||
zero = tcg_const_i32(0);
|
||||
tcg_gen_neg_i32(neg, arg1);
|
||||
tcg_gen_movcond_i32(TCG_COND_LT, ret, arg1, zero, neg, arg1);
|
||||
}
|
||||
|
||||
/* abs rd */
|
||||
/* abs rs, rd */
|
||||
static bool trans_ABS_rr(DisasContext *ctx, arg_ABS_rr *a)
|
||||
{
|
||||
rx_gen_op_rr(rx_abs, a->rd, a->rs);
|
||||
rx_gen_op_rr(tcg_gen_abs_i32, a->rd, a->rs);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user