Merge ktlim@zizzer:/bk/newmem
[gem5.git] / src / arch / mips / isa / formats / int.isa
index 56a4ec2041f14fd22e8c4ba4d50b124db334ecb5..2f131f6d9676ff5d9fa6dde3f40f4fcc3d767a87 100644 (file)
@@ -34,7 +34,6 @@
 //
 output header {{
 #include <iostream>
-    using namespace std;
         /**
          * Base class for integer operations.
          */
@@ -225,7 +224,7 @@ output decoder {{
 }};
 
 def format IntOp(code, *opt_flags) {{
-    iop = InstObjParams(name, Name, 'IntOp', CodeBlock(code), opt_flags)
+    iop = InstObjParams(name, Name, 'IntOp', code, opt_flags)
     header_output = BasicDeclare.subst(iop)
     decoder_output = BasicConstructor.subst(iop)
     decode_block = RegNopCheckDecode.subst(iop)
@@ -233,7 +232,7 @@ def format IntOp(code, *opt_flags) {{
 }};
 
 def format IntImmOp(code, *opt_flags) {{
-    iop = InstObjParams(name, Name, 'IntImmOp', CodeBlock(code), opt_flags)
+    iop = InstObjParams(name, Name, 'IntImmOp', code, opt_flags)
     header_output = BasicDeclare.subst(iop)
     decoder_output = BasicConstructor.subst(iop)
     decode_block = ImmNopCheckDecode.subst(iop)
@@ -241,15 +240,10 @@ def format IntImmOp(code, *opt_flags) {{
 }};
 
 def format HiLoOp(code, *opt_flags) {{
-    if '.sd' in code:
-        code = 'int64_t ' + code
-    elif '.ud' in code:
-        code = 'uint64_t ' + code
-
     code += 'HI = val<63:32>;\n'
     code += 'LO = val<31:0>;\n'
 
-    iop = InstObjParams(name, Name, 'HiLoOp', CodeBlock(code), opt_flags)
+    iop = InstObjParams(name, Name, 'HiLoOp', code, opt_flags)
     header_output = BasicDeclare.subst(iop)
     decoder_output = BasicConstructor.subst(iop)
     decode_block = BasicDecode.subst(iop)
@@ -257,11 +251,11 @@ def format HiLoOp(code, *opt_flags) {{
 }};
 
 def format HiLoMiscOp(code, *opt_flags) {{
-    iop = InstObjParams(name, Name, 'HiLoMiscOp', CodeBlock(code), opt_flags)
+    iop = InstObjParams(name, Name, 'HiLoMiscOp', code, opt_flags)
     header_output = BasicDeclare.subst(iop)
     decoder_output = BasicConstructor.subst(iop)
     decode_block = BasicDecode.subst(iop)
-    exec_output = HiLoExecute.subst(iop)
+    exec_output = BasicExecute.subst(iop)
 }};