diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2008-10-12 17:52:51 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2008-10-12 17:52:51 -0700 |
commit | cefb768131b1d0582c5cbe83feaa97060dfe15af (patch) | |
tree | ec8baa94f26f120550e451ba544eaa9d261626f9 /src/arch/x86 | |
parent | e5f80924671bf0cfaf02c51f4b98d529631733f1 (diff) | |
download | gem5-cefb768131b1d0582c5cbe83feaa97060dfe15af.tar.xz |
X86: Create a handy way to access labels from the ROM in microcode.
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/isa/microasm.isa | 5 | ||||
-rw-r--r-- | src/arch/x86/isa/microops/base.isa | 1 | ||||
-rw-r--r-- | src/arch/x86/isa/rom.isa | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/arch/x86/isa/microasm.isa b/src/arch/x86/isa/microasm.isa index 9a5019f10..d7b008145 100644 --- a/src/arch/x86/isa/microasm.isa +++ b/src/arch/x86/isa/microasm.isa @@ -183,6 +183,11 @@ let {{ assembler.symbols["label"] = labeler + def rom_labeler(labelStr): + return "romMicroPC(RomLabels::extern_label_%s)" % labelStr + + assembler.symbols["rom_label"] = rom_labeler + def stack_index(index): return "(NUM_FLOATREGS + (((%s) + 8) %% 8))" % index diff --git a/src/arch/x86/isa/microops/base.isa b/src/arch/x86/isa/microops/base.isa index 994e997d8..057d237ad 100644 --- a/src/arch/x86/isa/microops/base.isa +++ b/src/arch/x86/isa/microops/base.isa @@ -88,6 +88,7 @@ let {{ // env may not be used in the microop's constructor. RegIndex reg = env.reg; reg = reg; + using namespace RomLabels; return %s; } ''' diff --git a/src/arch/x86/isa/rom.isa b/src/arch/x86/isa/rom.isa index 7d3eb8670..59b280056 100644 --- a/src/arch/x86/isa/rom.isa +++ b/src/arch/x86/isa/rom.isa @@ -55,9 +55,6 @@ let {{ def getDeclaration(self): declareLabels = "namespace RomLabels {\n" - for (label, microop) in self.labels.items(): - declareLabels += "const static uint64_t label_%s = %d;\n" \ - % (label, microop.micropc) for (label, microop) in self.externs.items(): declareLabels += \ "const static MicroPC extern_label_%s = %d;\n" \ |