Patch: Fix rip-relative addressing for SSE compare
This patch corrects a bug with rip-relative addressing for some SSE compare instructions on x86_64. This makes GNU wget work on x86_64.
Signature · 18 lines
Robin
Index: target-i386/translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-i386/translate.c,v
retrieving revision 1.56
diff -u -b -r1.56 translate.c
--- target-i386/translate.c 24 Apr 2006 20:14:56 -0000 1.56
+++ target-i386/translate.c 4 Jun 2006 00:22:25 -0000
@@ -2990,6 +2990,8 @@
gen_op_andl_A0_ffff();
}
gen_add_A0_ds_seg(s);
+ } else if (b == 0xc2) {
+ s->rip_offset++;
}
if (is_xmm) {
op1_offset = offsetof(CPUX86State,xmm_regs[reg]);Quoted 2 lines · Robin Green
This patch corrects a bug with rip-relative addressing for some SSE compare instructions on
x86_64. This makes GNU wget work onx86_64.
I made a more complete fix. Tell me if it works on your examples.
Fabrice.