[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/40] Add vsl{b,h,w} instructions.
From: |
Nathan Froyd |
Subject: |
[Qemu-devel] [PATCH 13/40] Add vsl{b,h,w} instructions. |
Date: |
Tue, 30 Dec 2008 19:09:55 -0800 |
Signed-off-by: Nathan Froyd <address@hidden>
---
target-ppc/helper.h | 3 +++
target-ppc/op_helper.c | 15 +++++++++++++++
target-ppc/translate.c | 3 +++
3 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/target-ppc/helper.h b/target-ppc/helper.h
index f2e91ca..7f3b011 100644
--- a/target-ppc/helper.h
+++ b/target-ppc/helper.h
@@ -152,6 +152,9 @@ DEF_HELPER_3(vsraw, void, avr, avr, avr)
DEF_HELPER_3(vsrb, void, avr, avr, avr)
DEF_HELPER_3(vsrh, void, avr, avr, avr)
DEF_HELPER_3(vsrw, void, avr, avr, avr)
+DEF_HELPER_3(vslb, void, avr, avr, avr)
+DEF_HELPER_3(vslh, void, avr, avr, avr)
+DEF_HELPER_3(vslw, void, avr, avr, avr)
DEF_HELPER_1(efscfsi, i32, i32)
DEF_HELPER_1(efscfui, i32, i32)
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 55f9c8b..4addf9a 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -2122,6 +2122,21 @@ VMUL(uh, u16, u32)
#undef VMUL_DO
#undef VMUL
+#define VSL(suffix, element) \
+ void helper_vsl##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \
+ { \
+ int i; \
+ for (i = 0; i < ARRAY_SIZE(r->element); i++) { \
+ unsigned int mask = ((1 << (3 + (sizeof (a->element[0]) >> 1))) -
1); \
+ unsigned int shift = b->element[i] & mask; \
+ r->element[i] = a->element[i] << shift; \
+ } \
+ }
+VSL(b, u8)
+VSL(h, u16)
+VSL(w, u32)
+#undef VSL
+
#define VSR(suffix, element) \
void helper_vsr##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \
{ \
diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 246a8fd..ff3fcb1 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -6219,6 +6219,9 @@ GEN_VXFORM(vmuleub, 4, 8);
GEN_VXFORM(vmuleuh, 4, 9);
GEN_VXFORM(vmulesb, 4, 12);
GEN_VXFORM(vmulesh, 4, 13);
+GEN_VXFORM(vslb, 2, 4);
+GEN_VXFORM(vslh, 2, 5);
+GEN_VXFORM(vslw, 2, 6);
GEN_VXFORM(vsrb, 2, 8);
GEN_VXFORM(vsrh, 2, 9);
GEN_VXFORM(vsrw, 2, 10);
--
1.6.0.5
- [Qemu-devel] [PATCH 22/40] Add GEN_VXFORM_SIMM macro for subsequent instructions., (continued)
- [Qemu-devel] [PATCH 22/40] Add GEN_VXFORM_SIMM macro for subsequent instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 39/40] Add {l,st}ve{b,h,w}x instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 01/40] Fix TCG error in gen_avr_ptr., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 18/40] Add v{add, sub}{s, u}{b, h, w}s instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 27/40] Add vupk{h,l}px instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 28/40] Add vupk{h,l}s{b,h} instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 40/40] Add vsumsws, vsum2sws, and vsum4{sbs, shs, ubs} instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 36/40] Add vmsumuh{m,s} instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 03/40] Add GEN_VXFORM macro for subsequent instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 23/40] Add vspltis{b,h,w} instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 13/40] Add vsl{b,h,w} instructions.,
Nathan Froyd <=
- [Qemu-devel] [PATCH 05/40] Add vavg{s,u}{b,h,w} instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 24/40] Add GEN_VXFORM_UIMM macro for subsequent instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 21/40] Add vsldoi instruction., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 30/40] Add vmsum{u,m}bm instructions., Nathan Froyd, 2008/12/30
- [Qemu-devel] [PATCH 26/40] Add GEN_VXFORM_NOA macro for subsequent instructions., Nathan Froyd, 2008/12/31
- [Qemu-devel] [PATCH 06/40] Add v{min, max}{s, u}{b, h, w} instructions., Nathan Froyd, 2008/12/31
- [Qemu-devel] [PATCH 33/40] Add vpks{h, w}{s, u}s, vpku{h, w}us, and vpku{h, w}um instructions., Nathan Froyd, 2008/12/31
- [Qemu-devel] [PATCH 07/40] Add GEN_VXRFORM{, 1} macros for subsequent instructions., Nathan Froyd, 2008/12/31
- [Qemu-devel] [PATCH 08/40] Add vcmpequ{b, h, w} and vcmpgt{s, u}{b, h, w} instructions., Nathan Froyd, 2008/12/31
- [Qemu-devel] [PATCH 19/40] Add vrl{b,h,w} instructions., Nathan Froyd, 2008/12/31
- Prev by Date:
[Qemu-devel] [PATCH 23/40] Add vspltis{b,h,w} instructions.
- Next by Date:
[Qemu-devel] [PATCH 05/40] Add vavg{s,u}{b,h,w} instructions.
- Previous by thread:
[Qemu-devel] [PATCH 23/40] Add vspltis{b,h,w} instructions.
- Next by thread:
[Qemu-devel] [PATCH 05/40] Add vavg{s,u}{b,h,w} instructions.
- Index(es):