summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops/specop.isa
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-06-21 12:03:22 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2007-06-21 12:03:22 -0700
commiteff122797b5bc735c6d7c797be691c0fa02032e3 (patch)
tree1dd1cef3b2b4e044fece9a406cd0ce97d09a2da7 /src/arch/x86/isa/microops/specop.isa
parent83af0fdcf57175adf8077c51e9ba872dd2c04b76 (diff)
parent5195500cdf7dc99b5367f91387eef4e9f5b65bfe (diff)
downloadgem5-eff122797b5bc735c6d7c797be691c0fa02032e3.tar.xz
Merge vm1.(none):/home/stever/bk/newmem-head
into vm1.(none):/home/stever/bk/newmem-cache2 --HG-- extra : convert_revision : 9002940097a166c8442ae1adf41b974227968920
Diffstat (limited to 'src/arch/x86/isa/microops/specop.isa')
-rw-r--r--src/arch/x86/isa/microops/specop.isa64
1 files changed, 30 insertions, 34 deletions
diff --git a/src/arch/x86/isa/microops/specop.isa b/src/arch/x86/isa/microops/specop.isa
index 96fdf1c5e..b56223390 100644
--- a/src/arch/x86/isa/microops/specop.isa
+++ b/src/arch/x86/isa/microops/specop.isa
@@ -59,67 +59,63 @@
//
//////////////////////////////////////////////////////////////////////////
-def template MicroFaultExecute {{
- Fault %(class_name)s ::execute(%(CPU_exec_context)s *xc,
- Trace::InstRecord *traceData) const
- {
- //Return the fault we were constructed with
- return fault;
- }
-}};
-
-def template MicroFaultDeclare {{
- class %(class_name)s : public X86MicroopBase
+output header {{
+ class MicroFault : public X86MicroopBase
{
protected:
Fault fault;
void buildMe();
public:
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
+ MicroFault(ExtMachInst _machInst, const char * instMnem,
bool isMicro, bool isDelayed, bool isFirst, bool isLast,
Fault _fault);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
+ MicroFault(ExtMachInst _machInst, const char * instMnem,
Fault _fault);
%(BasicExecDeclare)s
};
}};
-def template MicroFaultConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
+output decoder {{
+ Fault MicroFault::execute(%(CPU_exec_context)s *xc,
+ Trace::InstRecord *traceData) const
+ {
+ //Return the fault we were constructed with
+ return fault;
+ }
+}};
- inline %(class_name)s::%(class_name)s(
+output decoder {{
+ inline MicroFault::MicroFault(
ExtMachInst machInst, const char * instMnem, Fault _fault) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem,
- false, false, false, false, %(op_class)s), fault(_fault)
+ X86MicroopBase(machInst, "fault", instMnem,
+ false, false, false, false, No_OpClass), fault(_fault)
{
- buildMe();
}
- inline %(class_name)s::%(class_name)s(
+ inline MicroFault::MicroFault(
ExtMachInst machInst, const char * instMnem,
bool isMicro, bool isDelayed, bool isFirst, bool isLast,
Fault _fault) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem,
- isMicro, isDelayed, isFirst, isLast, %(op_class)s),
+ X86MicroopBase(machInst, "fault", instMnem,
+ isMicro, isDelayed, isFirst, isLast, No_OpClass),
fault(_fault)
{
- buildMe();
}
}};
let {{
- # This microop takes in a single parameter, a fault to return.
- iop = InstObjParams("fault", "GenFault", 'X86MicroopBase', {"code" : ""})
- header_output += MicroFaultDeclare.subst(iop)
- decoder_output += MicroFaultConstructor.subst(iop)
- exec_output += MicroFaultExecute.subst(iop)
+ class Fault(X86Microop):
+ def __init__(self, fault):
+ self.fault = fault
+
+ def getAllocator(self, *microFlags):
+ allocator = '''new MicroFault(machInst, mnemonic
+ %(flags)s, %(fault)s)''' % {
+ "flags" : self.microFlagsText(microFlags),
+ "fault" : self.fault}
+ return allocator
+ microopClasses["fault"] = Fault
}};