changeset cca6726c0d88 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=cca6726c0d88
description:
        X86: Implement local labels for the ROM that actually refer into the 
ROM.

diffstat:

2 files changed, 3 insertions(+)
src/arch/x86/isa/microasm.isa |    2 ++
src/arch/x86/isa/rom.isa      |    1 +

diffs (28 lines):

diff -r 7828ee363019 -r cca6726c0d88 src/arch/x86/isa/microasm.isa
--- a/src/arch/x86/isa/microasm.isa     Sun Oct 12 20:38:22 2008 -0700
+++ b/src/arch/x86/isa/microasm.isa     Sun Oct 12 20:44:11 2008 -0700
@@ -188,6 +188,11 @@
 
     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 -r 7828ee363019 -r cca6726c0d88 src/arch/x86/isa/rom.isa
--- a/src/arch/x86/isa/rom.isa  Sun Oct 12 20:38:22 2008 -0700
+++ b/src/arch/x86/isa/rom.isa  Sun Oct 12 20:44:11 2008 -0700
@@ -55,6 +55,9 @@
 
         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" \
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to