qemu-e2k/target-i386
Vitaly Chipounov 7162ab21fe x86: Fixed incorrect segment base address addition in 64-bits mode
According to the Intel manual
"Intel® 64 and IA-32 Architectures Software Developer’s Manual
Volume 3", "3.4.4 Segment Loading Instructions in IA-32e Mode":

"When in compatibility mode, FS and GS overrides operate as defined by
32-bit mode behavior regardless of the value loaded into the upper 32
linear-address bits of the hidden descriptor register base field.
Compatibility mode ignores the upper 32 bits when calculating an effective address."

However, the code misses the 64-bit mode case, where an instruction with
address and segment size override would be translated incorrectly. For example,
inc dword ptr gs:260h[ebx*4] gets incorrectly translated to:

(uint32_t)(gs.base + ebx * 4 + 0x260)
instead of
gs.base + (uint32_t)(ebx * 4 + 0x260)

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-07-29 08:45:57 +00:00
..
Makefile.objs x86: rename op_helper.c to seg_helper.c 2012-06-28 20:28:09 +00:00
TODO target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions 2012-01-11 09:55:28 +01:00
arch_dump.c Fix some more license versions (GPL2+ instead of GPL2) 2012-06-11 22:20:21 +02:00
arch_memory_mapping.c Fix some more license versions (GPL2+ instead of GPL2) 2012-06-11 22:20:21 +02:00
cc_helper.c x86: split off condition code helpers 2012-06-28 20:28:08 +00:00
cc_helper_template.h x86: split condition code and shift templates 2012-06-28 20:28:08 +00:00
cpu-qom.h target-i386: Defer MCE init 2012-05-12 14:17:52 +02:00
cpu.c Recognize PCID feature 2012-07-21 10:54:40 +01:00
cpu.h apic: Defer interrupt updates to VCPU thread 2012-07-10 11:31:09 +03:00
excp_helper.c x86: avoid an extern declaration 2012-06-28 20:28:08 +00:00
fpu_helper.c x86: split off FPU helpers 2012-06-28 20:28:08 +00:00
helper.c x86: avoid AREG0 for exceptions 2012-06-28 20:28:08 +00:00
helper.h x86: avoid AREG0 for exceptions 2012-06-28 20:28:08 +00:00
hyperv.c hyper-v: introduce Hyper-V support infrastructure. 2012-01-19 08:32:12 -02:00
hyperv.h hyperv: fix build on non-KVM hosts 2012-01-23 20:04:51 +00:00
int_helper.c x86: split off integer helpers 2012-06-28 20:28:08 +00:00
ioport-user.c build: move obj-TARGET-y variables to nested Makefile.objs 2012-06-07 07:17:36 +02:00
kvm.c apic: Defer interrupt updates to VCPU thread 2012-07-10 11:31:09 +03:00
machine.c target-i386: Don't overuse CPUState 2012-03-14 22:20:25 +01:00
mem_helper.c x86: split off memory access helpers 2012-06-28 20:28:09 +00:00
misc_helper.c x86: split off misc helpers 2012-06-28 20:28:09 +00:00
ops_sse.h x86: fix coding style in ops_sse.h 2012-06-28 20:28:08 +00:00
ops_sse_header.h tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts. 2010-06-16 11:29:11 +02:00
seg_helper.c x86: rename op_helper.c to seg_helper.c 2012-06-28 20:28:09 +00:00
shift_helper_template.h x86: split condition code and shift templates 2012-06-28 20:28:08 +00:00
smm_helper.c x86: split off SMM helpers 2012-06-28 20:28:09 +00:00
svm.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
svm_helper.c x86: split off SVM helpers 2012-06-28 20:28:09 +00:00
translate.c x86: Fixed incorrect segment base address addition in 64-bits mode 2012-07-29 08:45:57 +00:00