From: Mitch Hayenga Date: Wed, 3 Sep 2014 11:42:46 +0000 (-0400) Subject: x86: Flag instructions that call suspend as IsQuiesce X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=afbae1ec95e94b6da441a0269dbd9359a7069e3d;p=gem5.git x86: Flag instructions that call suspend as IsQuiesce The o3 cpu relies upon instructions that suspend a thread context being flagged as "IsQuiesce". If they are not, unpredictable behavior can occur. This patch fixes that for the x86 ISA. --- diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index fb3add4ac..eb395fce2 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -141,13 +141,13 @@ }}, IsNonSpeculative); 0x01: m5quiesce({{ PseudoInst::quiesce(xc->tcBase()); - }}, IsNonSpeculative); + }}, IsNonSpeculative, IsQuiesce); 0x02: m5quiesceNs({{ PseudoInst::quiesceNs(xc->tcBase(), Rdi); - }}, IsNonSpeculative); + }}, IsNonSpeculative, IsQuiesce); 0x03: m5quiesceCycle({{ PseudoInst::quiesceCycles(xc->tcBase(), Rdi); - }}, IsNonSpeculative); + }}, IsNonSpeculative, IsQuiesce); 0x04: m5quiesceTime({{ Rax = PseudoInst::quiesceTime(xc->tcBase()); }}, IsNonSpeculative); diff --git a/src/arch/x86/isa/microops/specop.isa b/src/arch/x86/isa/microops/specop.isa index 854d3910f..77c459097 100644 --- a/src/arch/x86/isa/microops/specop.isa +++ b/src/arch/x86/isa/microops/specop.isa @@ -63,7 +63,8 @@ output header {{ MicroHalt(ExtMachInst _machInst, const char * instMnem, uint64_t setFlags) : X86MicroopBase(_machInst, "halt", instMnem, - setFlags | (ULL(1) << StaticInst::IsNonSpeculative), + setFlags | (ULL(1) << StaticInst::IsNonSpeculative) | + (ULL(1) << StaticInst::IsQuiesce), No_OpClass) { }