summaryrefslogtreecommitdiff
path: root/target-i386/ops_sse.h
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-16 01:07:28 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-16 01:07:28 +0000
commitd52cf7a64afb766b2b9a88738353bb5ec810b328 (patch)
treefb65af20860f0ad3e3acb5a6b35827dbcd0b71c7 /target-i386/ops_sse.h
parentbb2d531499960c881facda2b468c359c7df97a75 (diff)
sse fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1224 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/ops_sse.h')
-rw-r--r--target-i386/ops_sse.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h
index 39c90d0c29..2ba2db3a7b 100644
--- a/target-i386/ops_sse.h
+++ b/target-i386/ops_sse.h
@@ -528,7 +528,7 @@ void OPPROTO glue(op_maskmov, SUFFIX) (void)
s = (Reg *)((char *)env + PARAM2);
for(i = 0; i < (8 << SHIFT); i++) {
if (s->B(i) & 0x80)
- stb(A0, d->B(i));
+ stb(A0 + i, d->B(i));
}
}
@@ -565,6 +565,20 @@ void OPPROTO glue(op_pshufw, SUFFIX) (void)
*d = r;
}
#else
+void OPPROTO op_shufps(void)
+{
+ Reg r, *d, *s;
+ int order;
+ d = (Reg *)((char *)env + PARAM1);
+ s = (Reg *)((char *)env + PARAM2);
+ order = PARAM3;
+ r.L(0) = d->L(order & 3);
+ r.L(1) = d->L((order >> 2) & 3);
+ r.L(2) = s->L((order >> 4) & 3);
+ r.L(3) = s->L((order >> 6) & 3);
+ *d = r;
+}
+
void OPPROTO op_shufpd(void)
{
Reg r, *d, *s;
@@ -572,7 +586,7 @@ void OPPROTO op_shufpd(void)
d = (Reg *)((char *)env + PARAM1);
s = (Reg *)((char *)env + PARAM2);
order = PARAM3;
- r.Q(0) = s->Q(order & 1);
+ r.Q(0) = d->Q(order & 1);
r.Q(1) = s->Q((order >> 1) & 1);
*d = r;
}