[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 45/52] target-ppc: Optimize rlwinm MB=0 ME=31
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 45/52] target-ppc: Optimize rlwinm MB=0 ME=31 |
Date: |
Thu, 4 Sep 2014 19:20:33 +0200 |
From: Tom Musta <address@hidden>
Optimize the special case of rlwinm where MB=0 and ME=31. This can
be implemented as a 32-bit ROTL.
Signed-off-by: Tom Musta <address@hidden>
Suggested-by: Richard Henderson <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/translate.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 095b83c..889e37d 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -1691,6 +1691,12 @@ static void gen_rlwinm(DisasContext *ctx)
tcg_gen_shri_tl(t0, t0, mb);
tcg_gen_ext32u_tl(cpu_gpr[rA(ctx->opcode)], t0);
tcg_temp_free(t0);
+ } else if (likely(mb == 0 && me == 31)) {
+ TCGv_i32 t0 = tcg_temp_new_i32();
+ tcg_gen_trunc_tl_i32(t0, cpu_gpr[rS(ctx->opcode)]);
+ tcg_gen_rotli_i32(t0, t0, sh);
+ tcg_gen_extu_i32_tl(cpu_gpr[rA(ctx->opcode)], t0);
+ tcg_temp_free_i32(t0);
} else {
TCGv t0 = tcg_temp_new();
#if defined(TARGET_PPC64)
--
1.8.1.4
- [Qemu-ppc] [PULL 34/52] KVM: Add helper to run KVM_CHECK_EXTENSION on vm fd, (continued)
- [Qemu-ppc] [PULL 34/52] KVM: Add helper to run KVM_CHECK_EXTENSION on vm fd, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 28/52] target-ppc: Bug Fix: rlwimi, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 32/52] target-ppc: Bug Fix: srawi, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 43/52] spapr-vlan: Don't touch last entry in buffer list, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 42/52] spapr_pci: Fix config space corruption, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 48/52] target-ppc: Clean up mullwo, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 39/52] PPC: mac_nvram: Split NVRAM into OF and OSX parts, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 46/52] target-ppc: Optimize rlwnm MB=0 ME=31, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 49/52] target-ppc: Implement mulldo with TCG, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 52/52] hypervisor property clashes with hypervisor node, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 45/52] target-ppc: Optimize rlwinm MB=0 ME=31,
Alexander Graf <=
- [Qemu-ppc] [PULL 38/52] PPC: mac_nvram: Allow 2 and 4 byte accesses, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 41/52] PPC: Cuda: Use cuda timer to expose tbfreq to guest, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 47/52] target-ppc: Clean Up mullw, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 50/52] spapr_pci: map the MSI window in each PHB, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 40/52] PPC: Mac: Move tbfreq into local variable, Alexander Graf, 2014/09/04
- [Qemu-ppc] [PULL 51/52] PPC: Fix default config ordering and add eTSEC for ppc64, Alexander Graf, 2014/09/04
- Re: [Qemu-ppc] [PULL 00/52] ppc patch queue 2014-09-04, Peter Maydell, 2014/09/04