gem5/src/arch
Jason Lowe-Power 3370059668 x86: Fix implicit stack addressing in 64-bit mode
When in 64-bit mode, if the stack is accessed implicitly by an instruction,
the alternate address prefix should be ignored if present.

This patch adds an extra flag to the ldstop which signifies when the
address override should be ignored. Then, for all of the affected
instructions, this patch adds two options to the ld and st opcode to
use the current stack addressing mode for all addresses and to ignore the
AddressSizeFlagBit.
Finally, this patch updates the x86 TLB to not truncate the address if it
is in 64-bit mode and the IgnoreAddrSizeFlagBit is set.

This fixes a problem when calling __libc_start_main with a binary that
is linked with a recent version of ld. This version of ld uses the
address override prefix (0x67) on the call instruction instead of a nop.

Note: This has not been tested in compatibility mode and only the call
instruction with the address override prefix has been tested.

See [1] page 9 (pdf page 45)

For instructions that are affected see [1] page 519 (pdf page 555).

[1] http://support.amd.com/TechDocs/24594.pdf

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2017-01-28 13:42:41 +05:30
..
alpha syscall_emul: [patch 4/22] remove redundant M5_pid field from process 2016-11-09 14:27:40 -06:00
arm style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
generic style: [patch 1/22] use /r/3648/ to reorganize includes 2016-11-09 14:27:37 -06:00
hsail hsail: disable asserts to allow immediate operands i.e. 0 with loads 2016-12-02 18:01:58 -05:00
mips style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
null cpu,isa,mem: Add per-thread wakeup logic 2015-09-30 11:14:19 -05:00
power style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
riscv style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
sparc syscall_emul: [patch 4/22] remove redundant M5_pid field from process 2016-11-09 14:27:40 -06:00
x86 x86: Fix implicit stack addressing in 64-bit mode 2017-01-28 13:42:41 +05:30
SConscript gpu-compute: add gpu_isa.hh to switch hdrs, add GPUISA to WF 2016-10-26 22:47:38 -04:00
isa_parser.py cpu, arm: Distinguish Float* and SimdFloat*, create FloatMem* opClass 2016-10-15 14:58:45 -05:00
micro_asm.py scons: add slicc and ply to sys.path and PYTHONPATH so everyone has access 2009-09-22 15:24:16 -07:00
micro_asm_test.py Add a second section to make sure the ROM is extended properly. 2007-05-31 22:21:21 +00:00