summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/macroop.isa
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-06-14 13:47:52 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-06-14 13:47:52 +0000
commit20ec77fdc17b3f3382b142d8241f31a34363804c (patch)
tree4e49fff7dfe33c72470b7443e5ffddc97c19798c /src/arch/x86/isa/macroop.isa
parentd265c9951f79e544a5d5cedbba6810feff812cc7 (diff)
downloadgem5-20ec77fdc17b3f3382b142d8241f31a34363804c.tar.xz
Get rid of some debug output and let macroops set headers in their constructor. The intention is to allow them to modify the emulation environment struct before it's used to construct its microops.
--HG-- extra : convert_revision : b04fc9ead8e3322fc3af3f14d75e2206ddfbe561
Diffstat (limited to 'src/arch/x86/isa/macroop.isa')
-rw-r--r--src/arch/x86/isa/macroop.isa19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/arch/x86/isa/macroop.isa b/src/arch/x86/isa/macroop.isa
index bc7fc8015..2d928d7c9 100644
--- a/src/arch/x86/isa/macroop.isa
+++ b/src/arch/x86/isa/macroop.isa
@@ -132,10 +132,11 @@ def template MacroConstructor {{
inline X86Macroop::%(class_name)s::%(class_name)s(ExtMachInst machInst, EmulEnv env)
: %(base_class)s("%(mnemonic)s", machInst, %(num_microops)s)
{
- %(constructor)s;
- //alloc_microops is the code that sets up the microops
- //array in the parent class.
- %(alloc_microops)s;
+ %(adjust_env)s;
+ %(constructor)s;
+ //alloc_microops is the code that sets up the microops
+ //array in the parent class.
+ %(alloc_microops)s;
}
}};
@@ -147,11 +148,15 @@ def template MacroConstructor {{
let {{
from micro_asm import Combinational_Macroop, Rom_Macroop
class X86Macroop(Combinational_Macroop):
+ def setAdjustEnv(self, val):
+ self.adjust_env = val
def __init__(self, name):
super(X86Macroop, self).__init__(name)
self.directives = {
+ "adjust_env" : self.setAdjustEnv
}
self.declared = False
+ self.adjust_env = ""
def getAllocator(self, env):
return "new X86Macroop::%s(machInst, %s)" % (self.name, env.getAllocator())
def getDeclaration(self):
@@ -174,7 +179,8 @@ let {{
micropc += 1
iop = InstObjParams(self.name, self.name, "Macroop",
{"code" : "", "num_microops" : numMicroops,
- "alloc_microops" : allocMicroops})
+ "alloc_microops" : allocMicroops,
+ "adjust_env" : self.adjust_env})
return MacroConstructor.subst(iop);
}};
@@ -218,13 +224,10 @@ let {{
%(dataSize)s)''' % \
self.__dict__
def addReg(self, reg):
- print "Adding reg \"%s\"" % reg
if not self.regUsed:
- print "Added as reg"
self.reg = reg
self.regUsed = True
elif not self.regmUsed:
- print "Added as regm"
self.regm = reg
self.regmUsed = True
else: