[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/42] target-ppc: add GEN_VXFORM_UIMM macro for sub
From: |
Nathan Froyd |
Subject: |
[Qemu-devel] [PATCH 26/42] target-ppc: add GEN_VXFORM_UIMM macro for subsequent instructions. |
Date: |
Sun, 14 Dec 2008 18:14:59 -0800 |
Signed-off-by: Nathan Froyd <address@hidden>
---
target-ppc/translate.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 4867f7e..a21b2f5 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -376,6 +376,8 @@ EXTRACT_SHELPER(SIMM, 0, 16);
EXTRACT_HELPER(UIMM, 0, 16);
/* 5 bits signed immediate value */
EXTRACT_HELPER(SIMM5, 16, 5);
+/* 5 bits signed immediate value */
+EXTRACT_HELPER(UIMM5, 16, 5);
/* Bit count */
EXTRACT_HELPER(NB, 11, 5);
/* Shift count */
@@ -6317,6 +6319,24 @@ GEN_VXFORM_SIMM(vspltisb, 780);
GEN_VXFORM_SIMM(vspltish, 844);
GEN_VXFORM_SIMM(vspltisw, 908);
+#define GEN_VXFORM_UIMM(name, xo) \
+ GEN_HANDLER(name, 0x04, (xo >> 1) & 0x1f, (xo >> 6) & 0x1f, 0x00000000,
PPC_ALTIVEC) \
+ { \
+ TCGv_ptr rb, rd; \
+ TCGv_i32 uimm; \
+ if (unlikely(!ctx->altivec_enabled)) { \
+ gen_exception(ctx, POWERPC_EXCP_VPU); \
+ return; \
+ } \
+ uimm = tcg_const_i32(UIMM5(ctx->opcode)); \
+ rb = gen_avr_ptr(rB(ctx->opcode)); \
+ rd = gen_avr_ptr(rD(ctx->opcode)); \
+ gen_helper_##name (rd, rb, uimm); \
+ tcg_temp_free_i32(uimm); \
+ tcg_temp_free(rb); \
+ tcg_temp_free(rd); \
+ }
+
#define GEN_VXRFORM1(opname, name, str, xo, rc) \
GEN_HANDLER2(name, str, 0x4, (xo >> 1) & 0x1f, ((xo >> 6) & 0x1f) | (rc <<
4), 0x00000000, PPC_ALTIVEC) \
{ \
--
1.6.0.5
- [Qemu-devel] [PATCH 31/42] target-ppc: add GEN_VAFORM_PAIRED macro for subsequent instructions., (continued)
- [Qemu-devel] [PATCH 31/42] target-ppc: add GEN_VAFORM_PAIRED macro for subsequent instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 35/42] target-ppc: add vpks{h, w}{s, u}s, vpku{h, w}us, and vpku{h, w}um instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 39/42] target-ppc: add vmsumsh{m, s} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 42/42] target-ppc: add vsumsws, vsum2sws, and vsum4{sbs, shs, ubs} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 02/42] target-ppc: add helper macros for later patches., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 08/42] target-ppc: add v{min, max}{s, u}{b, h, w} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 13/42] target-ppc: add vmul{e, o}{s, u}{b, h} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 21/42] target-ppc: add vrl{b, h, w} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 26/42] target-ppc: add GEN_VXFORM_UIMM macro for subsequent instructions.,
Nathan Froyd <=
- [Qemu-devel] [PATCH 30/42] target-ppc: add vupk{h, l}s{b, h} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 34/42] target-ppc: add saturating arithmetic conversion functions for subsequent instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 36/42] target-ppc: add vpkpx instruction., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 04/42] target-ppc: add GEN_VXFORM macro for subsequent instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 29/42] target-ppc: add vupk{h, l}px instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 15/42] target-ppc: add vsl{b, h, w} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 03/42] target-ppc: add gen_avr_ptr function., Nathan Froyd, 2008/12/14