summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-12-04 18:30:41 -0800
committerGabe Black <gabeblack@google.com>2017-12-05 23:48:57 +0000
commit855660f9c7588497bdda6807064217e289d65f69 (patch)
treef45ff73ea487d3294992b010c37300c31edd447d /src/arch/x86
parentf19bb4e88da6ea440db9ca1ce6e2ec1a446ed21c (diff)
downloadgem5-855660f9c7588497bdda6807064217e289d65f69.tar.xz
x86: LOOP's operand size defaults to 64 bits in 64 bit mode.
The microcode for those instructions needs a directive which overrides that setting in the instructions emulation environment. Reported-by: Matt Sinclair <mattdsinclair@gmail.com> Change-Id: I474d938c0b3cf01da92ec817a58b08de783f1967 Reviewed-on: https://gem5-review.googlesource.com/6301 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py b/src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py
index 55c1a7fea..919551e77 100644
--- a/src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py
+++ b/src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py
@@ -37,18 +37,24 @@
microcode = '''
def macroop LOOP_I {
+ # Make the default data size of pops 64 bits in 64 bit mode
+ .adjust_env oszIn64Override
rdip t1
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
wripi t1, imm, flags=(nCEZF,)
};
def macroop LOOPNE_I {
+ # Make the default data size of pops 64 bits in 64 bit mode
+ .adjust_env oszIn64Override
rdip t1
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
wripi t1, imm, flags=(CSTRnZnEZF,)
};
def macroop LOOPE_I {
+ # Make the default data size of pops 64 bits in 64 bit mode
+ .adjust_env oszIn64Override
rdip t1
subi rcx, rcx, 1, flags=(EZF,), dataSize=asz
wripi t1, imm, flags=(CSTRZnEZF,)