[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/42] target-ppc: add GEN_VXRFORM{, 1} macros for s
From: |
Nathan Froyd |
Subject: |
[Qemu-devel] [PATCH 09/42] target-ppc: add GEN_VXRFORM{, 1} macros for subsequent instructions. |
Date: |
Sun, 14 Dec 2008 18:14:42 -0800 |
Signed-off-by: Nathan Froyd <address@hidden>
---
target-ppc/translate.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 0266942..53cff59 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -6176,6 +6176,33 @@ GEN_VXFORM(vavgsb, 1282);
GEN_VXFORM(vavgsh, 1346);
GEN_VXFORM(vavgsw, 1410);
+#define GEN_VXRFORM1(opname, name, str, xo, rc) \
+ GEN_HANDLER2(name, str, 0x4, (xo >> 1) & 0x1f, ((xo >> 6) & 0x1f) | (rc <<
4), 0x00000000, PPC_ALTIVEC) \
+ { \
+ TCGv_ptr ra, rb, rd; \
+ TCGv_i32 result; \
+ if (unlikely(!ctx->altivec_enabled)) { \
+ gen_exception(ctx, POWERPC_EXCP_VPU); \
+ return; \
+ } \
+ ra = gen_avr_ptr(rA(ctx->opcode)); \
+ rb = gen_avr_ptr(rB(ctx->opcode)); \
+ rd = gen_avr_ptr(rD(ctx->opcode)); \
+ result = tcg_temp_new_i32(); \
+ gen_helper_##opname (result, rd, ra, rb); \
+ if (rc) { \
+ tcg_gen_mov_i32(cpu_crf[6], result); \
+ } \
+ tcg_temp_free(ra); \
+ tcg_temp_free(rb); \
+ tcg_temp_free(rd); \
+ tcg_temp_free_i32(result); \
+ }
+
+#define GEN_VXRFORM(name, xo) \
+ GEN_VXRFORM1(name, name, #name, xo, 0) \
+ GEN_VXRFORM1(name, name##_, #name ".", xo, 1)
+
/*** SPE extension ***/
/* Register moves */
--
1.6.0.5
- [Qemu-devel] [PATCH 34/42] target-ppc: add saturating arithmetic conversion functions for subsequent instructions., (continued)
- [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
- [Qemu-devel] [PATCH 09/42] target-ppc: add GEN_VXRFORM{, 1} macros for subsequent instructions.,
Nathan Froyd <=
- [Qemu-devel] [PATCH 22/42] target-ppc: add vs{l,r} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 27/42] target-ppc: add vsplt{b, h, w} instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 32/42] target-ppc: add vmsum{u, m}bm instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 37/42] target-ppc: add vmh{, r}addshs instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 33/42] target-ppc: add vsel and vperm instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 05/42] target-ppc: add v{add, sub}u{b, h, w}m instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 11/42] target-ppc: add vscr access macros., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 16/42] target-ppc: add vs{l,r}o instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 20/42] target-ppc: add v{add, sub}{s, u}{b, h, w}s instructions., Nathan Froyd, 2008/12/14
- [Qemu-devel] [PATCH 38/42] target-ppc: add vmsumuh{m, s} instructions., Nathan Froyd, 2008/12/14