[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/50] target/i386: fix phminposuw in-place operation
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 05/50] target/i386: fix phminposuw in-place operation |
Date: |
Tue, 19 Sep 2017 14:28:54 +0200 |
From: Joseph Myers <address@hidden>
The SSE4.1 phminposuw instruction finds the minimum 16-bit element in
the source vector, putting the value of that element in the low 16
bits of the destination vector, the index of that element in the next
three bits and zeroing the rest of the destination. The helper for
this operation fills the destination from high to low, meaning that
when the source and destination are the same register, the minimum
source element can be overwritten before it is copied to the
destination. This patch fixes it to fill the destination from low to
high instead, so the minimum source element is always copied first.
This fixes one gcc test failure in my GCC 6-based testing (and so
concludes the present sequence of patches, as I don't have any further
gcc test failures left in that testing that I attribute to QEMU bugs).
Signed-off-by: Joseph Myers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/ops_sse.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 9f1b351..ed05989 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -1710,10 +1710,10 @@ void glue(helper_phminposuw, SUFFIX)(CPUX86State *env,
Reg *d, Reg *s)
idx = 7;
}
- d->Q(1) = 0;
- d->L(1) = 0;
- d->W(1) = idx;
d->W(0) = s->W(idx);
+ d->W(1) = idx;
+ d->L(1) = 0;
+ d->Q(1) = 0;
}
void glue(helper_roundps, SUFFIX)(CPUX86State *env, Reg *d, Reg *s,
--
1.8.3.1
- [Qemu-devel] [PULL 00/50] Misc patches for 2017-09-19, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 02/50] target/i386: set rip_offset for further SSE instructions, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 05/50] target/i386: fix phminposuw in-place operation,
Paolo Bonzini <=
- [Qemu-devel] [PULL 04/50] target/i386: fix pcmpxstrx substring search, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 03/50] target/i386: fix packusdw in-place operation, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 01/50] target/i386: fix pmovsx/pmovzx in-place operations, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 06/50] virtio-scsi: Add virtqueue_size parameter allowing virtqueue size to be set., Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 09/50] scsi: Improve scsi_sense_to_errno, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 08/50] scsi: Refactor scsi sense interpreting code, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 11/50] scsi-block: Support rerror/werror, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 14/50] scsi: introduce scsi_build_sense, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 10/50] scsi: Introduce scsi_sense_buf_to_errno, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 07/50] scsi-bus: correct responses for INQUIRY and REQUEST SENSE, Paolo Bonzini, 2017/09/19