From: Gabe Black Date: Mon, 13 Oct 2008 03:44:11 +0000 (-0700) Subject: X86: Implement local labels for the ROM that actually refer into the ROM. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6074b1abf2e235f9a5d3ad78879a805ca335dc0e;p=gem5.git X86: Implement local labels for the ROM that actually refer into the ROM. --- diff --git a/src/arch/x86/isa/microasm.isa b/src/arch/x86/isa/microasm.isa index 29ec6dc94..81aa1dafe 100644 --- a/src/arch/x86/isa/microasm.isa +++ b/src/arch/x86/isa/microasm.isa @@ -188,6 +188,11 @@ let {{ assembler.symbols["rom_label"] = rom_labeler + def rom_local_labeler(labelStr): + return "romMicroPC(RomLabels::label_%s)" % labelStr + + assembler.symbols["rom_local_label"] = rom_local_labeler + def stack_index(index): return "(NUM_FLOATREGS + (((%s) + 8) %% 8))" % index diff --git a/src/arch/x86/isa/rom.isa b/src/arch/x86/isa/rom.isa index 59b280056..7d3eb8670 100644 --- a/src/arch/x86/isa/rom.isa +++ b/src/arch/x86/isa/rom.isa @@ -55,6 +55,9 @@ 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" \