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
This commit is contained in:
@@ -72,24 +72,19 @@
|
||||
|
||||
namespace X86ISA;
|
||||
|
||||
//Include the operand_types and operand definitions. These are needed by
|
||||
//the microop definitions.
|
||||
##include "operands.isa"
|
||||
|
||||
//Include the bitfield definitions
|
||||
##include "bitfields.isa"
|
||||
|
||||
//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 code to build macroops.
|
||||
##include "macroop.isa"
|
||||
|
||||
//Include the simple microcode assembler. This will hopefully stay
|
||||
//unspecialized for x86 and can later be made available to other ISAs.
|
||||
##include "microasm.isa"
|
||||
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
}};
|
||||
|
||||
Reference in New Issue
Block a user