[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 53/65] target-xtensa: Use clrsb helper
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL 53/65] target-xtensa: Use clrsb helper |
Date: |
Tue, 10 Jan 2017 18:18:08 -0800 |
Signed-off-by: Richard Henderson <address@hidden>
---
target/xtensa/translate.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 5c719a4..5a93705 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -1372,16 +1372,7 @@ static void disas_xtensa_insn(CPUXtensaState *env,
DisasContext *dc)
case 14: /*NSAu*/
HAS_OPTION(XTENSA_OPTION_MISC_OP_NSA);
if (gen_window_check2(dc, RRR_S, RRR_T)) {
- TCGv_i32 t0 = tcg_temp_new_i32();
-
- /* if (v & 0x80000000) v = ~v; */
- tcg_gen_sari_i32(t0, cpu_R[RRR_S], 31);
- tcg_gen_xor_i32(t0, t0, cpu_R[RRR_S]);
-
- /* r = (v ? clz(v) : 32) - 1; */
- tcg_gen_clzi_i32(t0, t0, 32);
- tcg_gen_subi_i32(cpu_R[RRR_T], t0, 1);
- tcg_temp_free_i32(t0);
+ tcg_gen_clrsb_i32(cpu_R[RRR_T], cpu_R[RRR_S]);
}
break;
--
2.9.3
- [Qemu-devel] [PULL 48/65] tcg/i386: Handle ctz and clz opcodes, (continued)
- [Qemu-devel] [PULL 48/65] tcg/i386: Handle ctz and clz opcodes, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 51/65] target-arm: Use clrsb helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 50/65] tcg: Add helpers for clrsb, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 52/65] target-tricore: Use clrsb helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 55/65] target-alpha: Use ctpop helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 57/65] target-s390x: Avoid a loop for popcnt, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 56/65] target-ppc: Use ctpop helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 60/65] target-i386: Use ctpop helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 58/65] target-sparc: Use ctpop helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 59/65] target-tilegx: Use ctpop helper, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 53/65] target-xtensa: Use clrsb helper,
Richard Henderson <=
- [Qemu-devel] [PULL 54/65] tcg: Add opcode for ctpop, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 62/65] tests: New test-bitcnt, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 63/65] tcg: Use ctpop to generate ctz if needed, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 64/65] tcg/ppc: Handle ctpop opcode, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 61/65] qemu/host-utils.h: Reduce the operation count in the fallback ctpop, Richard Henderson, 2017/01/10
- [Qemu-devel] [PULL 65/65] tcg/i386: Handle ctpop opcode, Richard Henderson, 2017/01/10
- Re: [Qemu-devel] [PULL 00/65] tcg 2.9 patch queue, no-reply, 2017/01/10
- Re: [Qemu-devel] [PULL 00/65] tcg 2.9 patch queue, Peter Maydell, 2017/01/12