diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-04-17 14:01:23 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-05-13 22:52:08 +0000 |
commit | e1c4786541d90fefc2e84d2db57e0a89c6893403 (patch) | |
tree | 1fdbcc4a8ae13d7079af669f334fb10b6ff436bb /target/xtensa | |
parent | 2f8036d2361d7ee31845d89353971a43e24a2917 (diff) | |
download | qemu-e1c4786541d90fefc2e84d2db57e0a89c6893403.zip qemu-e1c4786541d90fefc2e84d2db57e0a89c6893403.tar.gz qemu-e1c4786541d90fefc2e84d2db57e0a89c6893403.tar.bz2 |
target/xtensa: Use tcg_gen_abs_i32
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/xtensa')
-rw-r--r-- | target/xtensa/translate.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 301c8e3..b063fa8 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1709,14 +1709,7 @@ void restore_state_to_opc(CPUXtensaState *env, TranslationBlock *tb, static void translate_abs(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - TCGv_i32 zero = tcg_const_i32(0); - TCGv_i32 neg = tcg_temp_new_i32(); - - tcg_gen_neg_i32(neg, arg[1].in); - tcg_gen_movcond_i32(TCG_COND_GE, arg[0].out, - arg[1].in, zero, arg[1].in, neg); - tcg_temp_free(neg); - tcg_temp_free(zero); + tcg_gen_abs_i32(arg[0].out, arg[1].in); } static void translate_add(DisasContext *dc, const OpcodeArg arg[], |