[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 53/65] target-xtensa: Use clrsb helper
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 53/65] target-xtensa: Use clrsb helper |
Date: |
Fri, 23 Dec 2016 20:00:30 -0800 |
Cc: Max Filippov <address@hidden>
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] [PATCH 39/65] target-i386: Use clz and ctz opcodes, (continued)
- [Qemu-devel] [PATCH 39/65] target-i386: Use clz and ctz opcodes, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 41/65] tcg/aarch64: Handle ctz and clz opcodes, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 43/65] tcg/mips: Handle clz opcode, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 37/65] target-xtensa: Use clz opcode, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 44/65] tcg/s390: Handle clz opcode, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 40/65] tcg/ppc: Handle ctz and clz opcodes, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 42/65] tcg/arm: Handle ctz and clz opcodes, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 52/65] target-tricore: Use clrsb helper, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 45/65] tcg/i386: Fuly convert tcg_target_op_def, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 47/65] tcg/i386: Allow bmi2 shiftx to have non-matching operands, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 53/65] target-xtensa: Use clrsb helper,
Richard Henderson <=
- [Qemu-devel] [PATCH 50/65] tcg: Add helpers for clrsb, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 56/65] target-ppc: Use ctpop helper, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 59/65] target-tilegx: Use ctpop helper, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 46/65] tcg/i386: Hoist common arguments in tcg_out_op, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 48/65] tcg/i386: Handle ctz and clz opcodes, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 51/65] target-arm: Use clrsb helper, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 55/65] target-alpha: Use ctpop helper, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 57/65] target-s390x: Avoid a loop for popcnt, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 54/65] tcg: Add opcode for ctpop, Richard Henderson, 2016/12/23
- [Qemu-devel] [PATCH 61/65] qemu/host-utils.h: Reduce the operation count in the fallback ctpop, Richard Henderson, 2016/12/23