From 855660f9c7588497bdda6807064217e289d65f69 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 4 Dec 2017 18:30:41 -0800 Subject: 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 Change-Id: I474d938c0b3cf01da92ec817a58b08de783f1967 Reviewed-on: https://gem5-review.googlesource.com/6301 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/arch/x86/isa/insts/general_purpose/control_transfer/loop.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch') 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,) -- cgit v1.2.3