gem5/src
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
..
arch x86: Fix implicit stack addressing in 64-bit mode 2017-01-28 13:42:41 +05:30
base style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
cpu style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
dev style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
doc sim: Adding support for power models 2016-06-06 17:16:44 +01:00
doxygen MEM: Put memory system document into doxygen 2012-09-25 11:49:41 -05:00
gpu-compute style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
kern style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
mem mem: cache: tags: Introduce NMRU Cache Replacement Policy 2017-01-24 11:28:54 +05:30
proto style: [patch 1/22] use /r/3648/ to reorganize includes 2016-11-09 14:27:37 -06:00
python style: [patch 3/22] reduce include dependencies in some headers 2016-11-09 14:27:40 -06:00
sim syscall_emul: [patch 4/22] remove redundant M5_pid field from process 2016-11-09 14:27:40 -06:00
unittest style: [patch 1/22] use /r/3648/ to reorganize includes 2016-11-09 14:27:37 -06:00
Doxyfile Doxygen: Update the version of the Doxyfile 2012-10-11 06:38:42 -04:00
SConscript scons: fix sanitizer flags with multiple sanitizers 2016-11-28 12:44:54 -05:00