qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6177] Add vupk{h,l}s{b,h} 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: 6177
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6177
Author:   aurel32
Date:     2009-01-04 22:11:20 +0000 (Sun, 04 Jan 2009)

Log Message:
-----------
Add vupk{h,l}s{b,h} instructions.

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

Modified Paths:
--------------
    trunk/target-ppc/helper.h
    trunk/target-ppc/op_helper.c
    trunk/target-ppc/translate.c

Modified: trunk/target-ppc/helper.h
===================================================================
--- trunk/target-ppc/helper.h	2009-01-04 22:11:10 UTC (rev 6176)
+++ trunk/target-ppc/helper.h	2009-01-04 22:11:20 UTC (rev 6177)
@@ -161,6 +161,10 @@
 DEF_HELPER_3(vspltw, void, avr, avr, i32)
 DEF_HELPER_2(vupkhpx, void, avr, avr)
 DEF_HELPER_2(vupklpx, void, avr, avr)
+DEF_HELPER_2(vupkhsb, void, avr, avr)
+DEF_HELPER_2(vupkhsh, void, avr, avr)
+DEF_HELPER_2(vupklsb, void, avr, avr)
+DEF_HELPER_2(vupklsh, void, avr, avr)
 
 DEF_HELPER_1(efscfsi, i32, i32)
 DEF_HELPER_1(efscfui, i32, i32)

Modified: trunk/target-ppc/op_helper.c
===================================================================
--- trunk/target-ppc/op_helper.c	2009-01-04 22:11:10 UTC (rev 6176)
+++ trunk/target-ppc/op_helper.c	2009-01-04 22:11:20 UTC (rev 6177)
@@ -2274,6 +2274,27 @@
 VUPKPX(hpx, UPKHI)
 #undef VUPKPX
 
+#define VUPK(suffix, unpacked, packee, hi)                              \
+    void helper_vupk##suffix (ppc_avr_t *r, ppc_avr_t *b)               \
+    {                                                                   \
+        int i;                                                          \
+        ppc_avr_t result;                                               \
+        if (hi) {                                                       \
+            for (i = 0; i < ARRAY_SIZE(r->unpacked); i++) {             \
+                result.unpacked[i] = b->packee[i];                      \
+            }                                                           \
+        } else {                                                        \
+            for (i = ARRAY_SIZE(r->unpacked); i < ARRAY_SIZE(r->packee); i++) { \
+                result.unpacked[i-ARRAY_SIZE(r->unpacked)] = b->packee[i]; \
+            }                                                           \
+        }                                                               \
+        *r = result;                                                    \
+    }
+VUPK(hsb, s16, s8, UPKHI)
+VUPK(hsh, s32, s16, UPKHI)
+VUPK(lsb, s16, s8, UPKLO)
+VUPK(lsh, s32, s16, UPKLO)
+#undef VUPK
 #undef UPKHI
 #undef UPKLO
 

Modified: trunk/target-ppc/translate.c
===================================================================
--- trunk/target-ppc/translate.c	2009-01-04 22:11:10 UTC (rev 6176)
+++ trunk/target-ppc/translate.c	2009-01-04 22:11:20 UTC (rev 6177)
@@ -6289,6 +6289,10 @@
         tcg_temp_free_ptr(rd);                                         \
     }
 
+GEN_VXFORM_NOA(vupkhsb, 7, 8);
+GEN_VXFORM_NOA(vupkhsh, 7, 9);
+GEN_VXFORM_NOA(vupklsb, 7, 10);
+GEN_VXFORM_NOA(vupklsh, 7, 11);
 GEN_VXFORM_NOA(vupkhpx, 7, 13);
 GEN_VXFORM_NOA(vupklpx, 7, 15);
 

^ 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] [6177] Add vupk{h,l}s{b,h} 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).