diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-08-23 09:44:19 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-08-23 09:44:19 -0700 |
commit | 5a1dbe4d99e9aad0f5c9002707a323ef8d6dfb8a (patch) | |
tree | c320a60e68034355a52afaef171ade75f9914d7a /src/arch/x86/isa/microops/base.isa | |
parent | b187e7c9cc025dbd5bc525de3ef9352219007f72 (diff) | |
download | gem5-5a1dbe4d99e9aad0f5c9002707a323ef8d6dfb8a.tar.xz |
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.
Diffstat (limited to 'src/arch/x86/isa/microops/base.isa')
-rw-r--r-- | src/arch/x86/isa/microops/base.isa | 19 |
1 files changed, 4 insertions, 15 deletions
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) |