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>
This commit is contained in:
@@ -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,)
|
||||
|
||||
Reference in New Issue
Block a user