summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-06-08 17:14:39 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-06-08 17:14:39 +0000
commit038fa489900fde11de63d9b21aebacd91d88d281 (patch)
treefb04330df785c26c8195c18bd03fe867ca4fe189
parent658df56bf3faba0d3bbd2b46c2835cb4ee7c6a17 (diff)
downloadgem5-038fa489900fde11de63d9b21aebacd91d88d281.tar.xz
Clean up where files are included, and get rid of some cruft.
src/arch/x86/isa/main.isa: Clean up where files are included. --HG-- extra : convert_revision : 0528359432bf0fb9198b63de9611176bc78e07c7
-rw-r--r--src/arch/x86/isa/main.isa22
-rw-r--r--src/arch/x86/isa/microasm.isa45
2 files changed, 14 insertions, 53 deletions
diff --git a/src/arch/x86/isa/main.isa b/src/arch/x86/isa/main.isa
index 509f4e222..d28390bd1 100644
--- a/src/arch/x86/isa/main.isa
+++ b/src/arch/x86/isa/main.isa
@@ -72,23 +72,18 @@
namespace X86ISA;
-//Include the base class for x86 instructions, and some support code.
-##include "base.isa"
-
-//Include the definitions for the instruction formats
-##include "formats/formats.isa"
-
//Include the operand_types and operand definitions. These are needed by
//the microop definitions.
##include "operands.isa"
-//Include the definitions of the micro ops.
-//These are StaticInst classes which stand on their own and make up an
-//internal instruction set.
-##include "microops/microops.isa"
+//Include the bitfield definitions
+##include "bitfields.isa"
+
+//Include the base class for x86 instructions, and some support code.
+##include "base.isa"
-//Include code to build macroops.
-##include "macroop.isa"
+//Include the definitions for the instruction formats
+##include "formats/formats.isa"
//Include the simple microcode assembler. This will hopefully stay
//unspecialized for x86 and can later be made available to other ISAs.
@@ -99,8 +94,5 @@ namespace X86ISA;
//microcode ISA.
##include "specialize.isa"
-//Include the bitfield definitions
-##include "bitfields.isa"
-
//Include the decoder definition
##include "decoder/decoder.isa"
diff --git a/src/arch/x86/isa/microasm.isa b/src/arch/x86/isa/microasm.isa
index e8033d31c..8a6e7ca52 100644
--- a/src/arch/x86/isa/microasm.isa
+++ b/src/arch/x86/isa/microasm.isa
@@ -55,8 +55,13 @@
//
// Authors: Gabe Black
-//##include "microops/microops.isa"
-//##include "macroop.isa"
+//Include the definitions of the micro ops.
+//These are StaticInst classes which stand on their own and make up an
+//internal instruction set.
+##include "microops/microops.isa"
+
+//Include code to build macroops.
+##include "macroop.isa"
let {{
import sys
@@ -68,39 +73,3 @@ let {{
assembler = MicroAssembler(X86Macroop, microopClasses, mainRom, Rom_Macroop)
macroopDict = assembler.assemble(microcode)
}};
-
-////////////////////////////////////////////////////////////////////
-//
-// Microcode assembler specialization for x86
-//
-
-let {{
- from micro_asm import MicroAssembler, Combinational_Macroop, Rom_Macroop, Rom
- class X86Macroop(Combinational_Macroop):
- def __init__(self, name):
- super(X86Macroop, self).__init__(name)
- self.directives = {
- }
-
- mainRom = Rom('main ROM')
-}};
-
-let {{
- class X86Microop(object):
- def __init__(self, name):
- self.name = name
-
- # This converts a list of python bools into
- # a comma seperated list of C++ bools.
- def microFlagsText(self, vals):
- text = ""
- for val in vals:
- if val:
- text += ", true"
- else:
- text += ", false"
- return text
-
- def getAllocator(self, mnemonic, *microFlags):
- return 'new %s(machInst, %s)' % (self.className, mnemonic, self.microFlagsText(microFlags))
-}};