From 5a1dbe4d99e9aad0f5c9002707a323ef8d6dfb8a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 23 Aug 2010 09:44:19 -0700 Subject: X86: Consolidate extra microop flags into one parameter. This single parameter replaces the collection of bools that set up various flavors of microops. A flag parameter also allows other flags to be set like the serialize before/after flags, etc., without having to change the constructor. --- src/arch/x86/isa/microops/base.isa | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'src/arch/x86/isa/microops/base.isa') diff --git a/src/arch/x86/isa/microops/base.isa b/src/arch/x86/isa/microops/base.isa index 2f8e04ab7..664f91860 100644 --- a/src/arch/x86/isa/microops/base.isa +++ b/src/arch/x86/isa/microops/base.isa @@ -78,25 +78,14 @@ let {{ def __init__(self, name): self.name = name - # This converts a python bool into a C++ bool - def cppBool(self, val): - if val: - return "true" - else: - return "false" - - # This converts a list of python bools into - # a comma seperated list of C++ bools. - def microFlagsText(self, vals): - text = "" - for val in vals: - text += ", %s" % self.cppBool(val) - return text + def microFlagsText(self, flags): + wrapped = ("(1ULL << StaticInst::%s)" % flag for flag in flags) + return " | ".join(wrapped) def getGeneratorDef(self, micropc): return self.generatorTemplate % \ (self.className, micropc, \ - self.getAllocator(True, True, False, False)) + self.getAllocator(["IsMicroop", "IsDelayedCommit"])) def getGenerator(self, micropc): return self.generatorNameTemplate % (self.className, micropc) -- cgit v1.2.3