diff options
author | Laurent Desnogues <laurent.desnogues@gmail.com> | 2009-09-13 14:27:31 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-09-26 21:29:59 +0200 |
commit | 7990496dcbdec56b192b8a0867f9fa26812b3dc0 (patch) | |
tree | c76d66530156415ec03957a9946b3ec108bdfda1 | |
parent | 02c068c3ae8ec2954ea03de61d6627c555d88bff (diff) |
ARM back-end: Use sxt[bh] instructions for ext{8, 6}s
This patch uses sxtb for ext8s_i32 and sxth for ext16s_i32 in ARM back-end.
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r-- | tcg/arm/tcg-target.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 59e89d486f..f8d626d029 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -1547,16 +1547,26 @@ static inline void tcg_out_op(TCGContext *s, int opc, break; case INDEX_op_ext8s_i32: +#ifdef __ARM_ARCH_7A__ + /* sxtb */ + tcg_out32(s, 0xe6af0070 | (args[0] << 12) | args[1]); +#else tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[1], SHIFT_IMM_LSL(24)); tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[0], SHIFT_IMM_ASR(24)); +#endif break; case INDEX_op_ext16s_i32: +#ifdef __ARM_ARCH_7A__ + /* sxth */ + tcg_out32(s, 0xe6bf0070 | (args[0] << 12) | args[1]); +#else tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[1], SHIFT_IMM_LSL(16)); tcg_out_dat_reg(s, COND_AL, ARITH_MOV, args[0], 0, args[0], SHIFT_IMM_ASR(16)); +#endif break; default: |