From 038fa489900fde11de63d9b21aebacd91d88d281 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 8 Jun 2007 17:14:39 +0000 Subject: 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 --- src/arch/x86/isa/microasm.isa | 45 +++++++------------------------------------ 1 file changed, 7 insertions(+), 38 deletions(-) (limited to 'src/arch/x86/isa/microasm.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)) -}}; -- cgit v1.2.3