qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6178] Add GEN_VAFORM_PAIRED macro for subsequent instructions.
@ 2009-01-04 22:11 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2009-01-04 22:11 UTC (permalink / raw)
  To: qemu-devel

Revision: 6178
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6178
Author:   aurel32
Date:     2009-01-04 22:11:29 +0000 (Sun, 04 Jan 2009)

Log Message:
-----------
Add GEN_VAFORM_PAIRED macro for subsequent instructions.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Modified Paths:
--------------
    trunk/target-ppc/translate.c

Modified: trunk/target-ppc/translate.c
===================================================================
--- trunk/target-ppc/translate.c	2009-01-04 22:11:20 UTC (rev 6177)
+++ trunk/target-ppc/translate.c	2009-01-04 22:11:29 UTC (rev 6178)
@@ -6353,6 +6353,29 @@
     tcg_temp_free(sh);
 }
 
+#define GEN_VAFORM_PAIRED(name0, name1, opc2)                           \
+    GEN_HANDLER(name0##_##name1, 0x04, opc2, 0xFF, 0x00000000, PPC_ALTIVEC) \
+    {                                                                   \
+        TCGv_ptr ra, rb, rc, rd;                                        \
+        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));                              \
+        rc = gen_avr_ptr(rC(ctx->opcode));                              \
+        rd = gen_avr_ptr(rD(ctx->opcode));                              \
+        if (Rc(ctx->opcode)) {                                          \
+            gen_helper_##name1 (rd, ra, rb, rc);                        \
+        } else {                                                        \
+            gen_helper_##name0 (rd, ra, rb, rc);                        \
+        }                                                               \
+        tcg_temp_free_ptr(ra);                                          \
+        tcg_temp_free_ptr(rb);                                          \
+        tcg_temp_free_ptr(rc);                                          \
+        tcg_temp_free_ptr(rd);                                          \
+    }
+
 /***                           SPE extension                               ***/
 /* Register moves */
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-04 22:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-04 22:11 [Qemu-devel] [6178] Add GEN_VAFORM_PAIRED macro for subsequent instructions Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).