diff --git a/src/arch/x86/insts/microop.cc b/src/arch/x86/insts/microop.cc index 0f81d6aa02..b9be362d5a 100644 --- a/src/arch/x86/insts/microop.cc +++ b/src/arch/x86/insts/microop.cc @@ -48,71 +48,71 @@ X86MicroopBase::checkCondition(uint64_t flags, int condition) const CCFlagBits ccflags = flags; switch(condition) { - case ConditionTests::True: + case condition_tests::True: return true; - case ConditionTests::ECF: + case condition_tests::ECF: return ccflags.ecf; - case ConditionTests::EZF: + case condition_tests::EZF: return ccflags.ezf; - case ConditionTests::SZnZF: + case condition_tests::SZnZF: return !(!ccflags.ezf && ccflags.zf); - case ConditionTests::MSTRZ: + case condition_tests::MSTRZ: panic("This condition is not implemented!"); - case ConditionTests::STRZ: + case condition_tests::STRZ: panic("This condition is not implemented!"); - case ConditionTests::MSTRC: + case condition_tests::MSTRC: panic("This condition is not implemented!"); - case ConditionTests::STRZnEZF: + case condition_tests::STRZnEZF: return !ccflags.ezf && ccflags.zf; //And no interrupts or debug traps are waiting - case ConditionTests::OF: + case condition_tests::OF: return ccflags.of; - case ConditionTests::CF: + case condition_tests::CF: return ccflags.cf; - case ConditionTests::ZF: + case condition_tests::ZF: return ccflags.zf; - case ConditionTests::CvZF: + case condition_tests::CvZF: return ccflags.cf | ccflags.zf; - case ConditionTests::SF: + case condition_tests::SF: return ccflags.sf; - case ConditionTests::PF: + case condition_tests::PF: return ccflags.pf; - case ConditionTests::SxOF: + case condition_tests::SxOF: return ccflags.sf ^ ccflags.of; - case ConditionTests::SxOvZF: + case condition_tests::SxOvZF: return (ccflags.sf ^ ccflags.of) | ccflags.zf; - case ConditionTests::False: + case condition_tests::False: return false; - case ConditionTests::NotECF: + case condition_tests::NotECF: return !ccflags.ecf; - case ConditionTests::NotEZF: + case condition_tests::NotEZF: return !ccflags.ezf; - case ConditionTests::NotSZnZF: + case condition_tests::NotSZnZF: return !ccflags.ezf && ccflags.zf; - case ConditionTests::NotMSTRZ: + case condition_tests::NotMSTRZ: panic("This condition is not implemented!"); - case ConditionTests::NotSTRZ: + case condition_tests::NotSTRZ: panic("This condition is not implemented!"); - case ConditionTests::NotMSTRC: + case condition_tests::NotMSTRC: panic("This condition is not implemented!"); - case ConditionTests::STRnZnEZF: + case condition_tests::STRnZnEZF: return !ccflags.ezf && !ccflags.zf; //And no interrupts or debug traps are waiting - case ConditionTests::NotOF: + case condition_tests::NotOF: return !ccflags.of; - case ConditionTests::NotCF: + case condition_tests::NotCF: return !ccflags.cf; - case ConditionTests::NotZF: + case condition_tests::NotZF: return !ccflags.zf; - case ConditionTests::NotCvZF: + case condition_tests::NotCvZF: return !(ccflags.cf | ccflags.zf); - case ConditionTests::NotSF: + case condition_tests::NotSF: return !ccflags.sf; - case ConditionTests::NotPF: + case condition_tests::NotPF: return !ccflags.pf; - case ConditionTests::NotSxOF: + case condition_tests::NotSxOF: return !(ccflags.sf ^ ccflags.of); - case ConditionTests::NotSxOvZF: + case condition_tests::NotSxOvZF: return !((ccflags.sf ^ ccflags.of) | ccflags.zf); } panic("Unknown condition: %d\n", condition); diff --git a/src/arch/x86/insts/microop.hh b/src/arch/x86/insts/microop.hh index 13c4bee5c7..e71fcadfea 100644 --- a/src/arch/x86/insts/microop.hh +++ b/src/arch/x86/insts/microop.hh @@ -39,11 +39,13 @@ #define __ARCH_X86_INSTS_MICROOP_HH__ #include "arch/x86/insts/static_inst.hh" +#include "base/compiler.hh" namespace X86ISA { -namespace ConditionTests +GEM5_DEPRECATED_NAMESPACE(ConditionTests, condition_tests); +namespace condition_tests { enum CondTest diff --git a/src/arch/x86/isa/microasm.isa b/src/arch/x86/isa/microasm.isa index ff110f1b05..4d4409ae9b 100644 --- a/src/arch/x86/isa/microasm.isa +++ b/src/arch/x86/isa/microasm.isa @@ -170,13 +170,13 @@ let {{ 'MSTRZ', 'STRZ', 'MSTRC', 'OF', 'CF', 'ZF', 'CvZF', 'SF', 'PF', 'SxOF', 'SxOvZF'): - assembler.symbols["C%s" % cond] = "ConditionTests::%s" % cond - assembler.symbols["nC%s" % cond] = "ConditionTests::Not%s" % cond - assembler.symbols["CSTRZnEZF"] = "ConditionTests::STRZnEZF" - assembler.symbols["CSTRnZnEZF"] = "ConditionTests::STRnZnEZF" + assembler.symbols["C%s" % cond] = "condition_tests::%s" % cond + assembler.symbols["nC%s" % cond] = "condition_tests::Not%s" % cond + assembler.symbols["CSTRZnEZF"] = "condition_tests::STRZnEZF" + assembler.symbols["CSTRnZnEZF"] = "condition_tests::STRnZnEZF" - assembler.symbols["CTrue"] = "ConditionTests::True" - assembler.symbols["CFalse"] = "ConditionTests::False" + assembler.symbols["CTrue"] = "condition_tests::True" + assembler.symbols["CFalse"] = "condition_tests::False" for reg in ('sysenter_cs', 'sysenter_esp', 'sysenter_eip', 'star', 'lstar', 'cstar', 'sf_mask', diff --git a/src/arch/x86/isa/microops/seqop.isa b/src/arch/x86/isa/microops/seqop.isa index 5eae7e692f..e42d888dc0 100644 --- a/src/arch/x86/isa/microops/seqop.isa +++ b/src/arch/x86/isa/microops/seqop.isa @@ -140,7 +140,7 @@ let {{ self.cond = " | ".join(flags) self.className += "Flags" else: - self.cond = "X86ISA::ConditionTests::True" + self.cond = "X86ISA::condition_tests::True" def getAllocator(self, microFlags): if not "IsLastMicroop" in microFlags: