x86: Flag instructions that call suspend as IsQuiesce
authorMitch Hayenga <mitch.hayenga@arm.com>
Wed, 3 Sep 2014 11:42:46 +0000 (07:42 -0400)
committerMitch Hayenga <mitch.hayenga@arm.com>
Wed, 3 Sep 2014 11:42:46 +0000 (07:42 -0400)
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.

src/arch/x86/isa/decoder/two_byte_opcodes.isa
src/arch/x86/isa/microops/specop.isa

index fb3add4ac0831410030ef05a96edcfc02441b02b..eb395fce2cc0c226053c1e711760565be81e1c44 100644 (file)
                         }}, 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);
index 854d3910f62b3479917576d852a7b3404c2e60f5..77c45909744579e232ad79cc5620a8419ff267f6 100644 (file)
@@ -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)
         {
         }