aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2013-03-26 19:56:01 +0100
committerAurelien Jarno <aurelien@aurel32.net>2013-04-01 18:49:15 +0200
commit2b8d7e9d728fe2b7c8ffb9859368fb2b5c0bf833 (patch)
tree719a1bd1cb9e9af0523b01b13514ee309e8b13db /target-i386
parent93e3c0ae69ae73d7f04ac378c5df6e98c7faa6dd (diff)
downloadqemu-arm-2b8d7e9d728fe2b7c8ffb9859368fb2b5c0bf833.tar.gz
target-i386: SSE4.2: fix pcmpXstrm instructions
pcmpXstrm instructions returns their result in the XMM0 register and not in the first operand. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/ops_sse.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h
index 0667c879ca..4a95f4130a 100644
--- a/target-i386/ops_sse.h
+++ b/target-i386/ops_sse.h
@@ -2116,16 +2116,16 @@ void glue(helper_pcmpestrm, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
if ((ctrl >> 6) & 1) {
if (ctrl & 1) {
for (i = 0; i < 8; i++, res >>= 1) {
- d->W(i) = (res & 1) ? ~0 : 0;
+ env->xmm_regs[0].W(i) = (res & 1) ? ~0 : 0;
}
} else {
for (i = 0; i < 16; i++, res >>= 1) {
- d->B(i) = (res & 1) ? ~0 : 0;
+ env->xmm_regs[0].B(i) = (res & 1) ? ~0 : 0;
}
}
} else {
- d->Q(1) = 0;
- d->Q(0) = res;
+ env->xmm_regs[0].Q(1) = 0;
+ env->xmm_regs[0].Q(0) = res;
}
}
@@ -2154,16 +2154,16 @@ void glue(helper_pcmpistrm, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
if ((ctrl >> 6) & 1) {
if (ctrl & 1) {
for (i = 0; i < 8; i++, res >>= 1) {
- d->W(i) = (res & 1) ? ~0 : 0;
+ env->xmm_regs[0].W(i) = (res & 1) ? ~0 : 0;
}
} else {
for (i = 0; i < 16; i++, res >>= 1) {
- d->B(i) = (res & 1) ? ~0 : 0;
+ env->xmm_regs[0].B(i) = (res & 1) ? ~0 : 0;
}
}
} else {
- d->Q(1) = 0;
- d->Q(0) = res;
+ env->xmm_regs[0].Q(1) = 0;
+ env->xmm_regs[0].Q(0) = res;
}
}