[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 53/64] target-xtensa: Use clrsb helper
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v4 53/64] target-xtensa: Use clrsb helper |
Date: |
Wed, 23 Nov 2016 14:01:50 +0100 |
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.7.4
- [Qemu-devel] [PATCH v4 44/64] tcg/s390: Handle clz opcode, (continued)
- [Qemu-devel] [PATCH v4 44/64] tcg/s390: Handle clz opcode, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 46/64] tcg/i386: Hoist common arguments in tcg_out_op, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 47/64] tcg/i386: Allow bmi2 shiftx to have non-matching operands, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 45/64] tcg/i386: Fuly convert tcg_target_op_def, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 51/64] target-arm: Use clrsb helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 49/64] tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 48/64] tcg/i386: Handle ctz and clz opcodes, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 50/64] tcg: Add helpers for clrsb, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 52/64] target-tricore: Use clrsb helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 53/64] target-xtensa: Use clrsb helper,
Richard Henderson <=
- [Qemu-devel] [PATCH v4 54/64] tcg: Add opcode for ctpop, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 55/64] target-alpha: Use ctpop helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 56/64] target-ppc: Use ctpop helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 57/64] target-s390x: Avoid a loop for popcnt, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 58/64] target-sparc: Use ctpop helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 59/64] target-tilegx: Use ctpop helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 60/64] target-i386: Use ctpop helper, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 61/64] qemu/host-utils.h: Reduce the operation count in the fallback ctpop, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 63/64] tcg/ppc: Handle ctpop opcode, Richard Henderson, 2016/11/23
- [Qemu-devel] [PATCH v4 62/64] tcg: Use ctpop to generate ctz if needed, Richard Henderson, 2016/11/23