summaryrefslogtreecommitdiffstats
path: root/target-i386
diff options
context:
space:
mode:
authorAnthony Liguori2011-11-21 21:36:55 +0100
committerAnthony Liguori2011-11-21 21:36:55 +0100
commit1571b6cba25df6d000b2539b8ba399839d15f9b6 (patch)
treea9b92e81d01e08e76477127d1e3dae07eaeca212 /target-i386
parentMerge remote-tracking branch 'kwolf/block-stable' into staging (diff)
parentx86: fix pcmpestrm and pcmpistrm (diff)
downloadqemu-1571b6cba25df6d000b2539b8ba399839d15f9b6.tar.gz
qemu-1571b6cba25df6d000b2539b8ba399839d15f9b6.tar.xz
qemu-1571b6cba25df6d000b2539b8ba399839d15f9b6.zip
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/ops_sse.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h
index aa41d25968..47dde78f89 100644
--- a/target-i386/ops_sse.h
+++ b/target-i386/ops_sse.h
@@ -1996,11 +1996,13 @@ void glue(helper_pcmpestrm, SUFFIX) (Reg *d, Reg *s, uint32_t ctrl)
if ((ctrl >> 6) & 1) {
if (ctrl & 1)
- for (i = 0; i <= 8; i--, res >>= 1)
+ for (i = 0; i < 8; i++, res >>= 1) {
d->W(i) = (res & 1) ? ~0 : 0;
+ }
else
- for (i = 0; i <= 16; i--, res >>= 1)
+ for (i = 0; i < 16; i++, res >>= 1) {
d->B(i) = (res & 1) ? ~0 : 0;
+ }
} else {
d->Q(1) = 0;
d->Q(0) = res;
@@ -2028,11 +2030,13 @@ void glue(helper_pcmpistrm, SUFFIX) (Reg *d, Reg *s, uint32_t ctrl)
if ((ctrl >> 6) & 1) {
if (ctrl & 1)
- for (i = 0; i <= 8; i--, res >>= 1)
+ for (i = 0; i < 8; i++, res >>= 1) {
d->W(i) = (res & 1) ? ~0 : 0;
+ }
else
- for (i = 0; i <= 16; i--, res >>= 1)
+ for (i = 0; i < 16; i++, res >>= 1) {
d->B(i) = (res & 1) ? ~0 : 0;
+ }
} else {
d->Q(1) = 0;
d->Q(0) = res;