[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/9] target/i386: set rip_offset for some SSE4.1 inst
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 5/9] target/i386: set rip_offset for some SSE4.1 instructions |
Date: |
Tue, 8 Aug 2017 17:29:37 +0200 |
From: Joseph Myers <address@hidden>
When emulating various SSE4.1 instructions such as pinsrd, the address
of a memory operand is computed without allowing for the 8-bit
immediate operand located after the memory operand, meaning that the
memory operand uses the wrong address in the case where it is
rip-relative. This patch adds the required rip_offset setting for
those instructions, so fixing some GCC test failures (13 in the gcc
testsuite in my GCC 6-based testing) when testing with a default CPU
setting enabling those instructions.
Signed-off-by: Joseph Myers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/translate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index cab9e32f91..5fdadf98cf 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -4080,6 +4080,7 @@ static void gen_sse(CPUX86State *env, DisasContext *s,
int b,
if (sse_fn_eppi == SSE_SPECIAL) {
ot = mo_64_32(s->dflag);
rm = (modrm & 7) | REX_B(s);
+ s->rip_offset = 1;
if (mod != 3)
gen_lea_modrm(env, s, modrm);
reg = ((modrm >> 3) & 7) | rex_r;
--
2.13.3
- [Qemu-devel] [PULL 0/9] Misc patches for 2017-08-08, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 1/9] rcu: completely disable pthread_atfork callbacks as soon as possible, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 5/9] target/i386: set rip_offset for some SSE4.1 instructions,
Paolo Bonzini <=
- [Qemu-devel] [PULL 6/9] qemu-img: Sort sub-command names in --help, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 3/9] kvm: workaround build break on gcc-7.1.1 / fedora26, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 4/9] scsi: clarify sense codes for LUN0 emulation, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 2/9] Revert "rcu: do not create thread in pthread_atfork callback", Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 7/9] qemu-io: Give more --version information, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 8/9] qga: Give more --version information, Paolo Bonzini, 2017/08/08
- [Qemu-devel] [PULL 9/9] maint: Include bug-reporting info in --help output, Paolo Bonzini, 2017/08/08
- Re: [Qemu-devel] [PULL 0/9] Misc patches for 2017-08-08, Peter Maydell, 2017/08/08