X86: Implement local labels for the ROM that actually refer into the ROM.

This commit is contained in:
Gabe Black 2008-10-12 20:44:11 -07:00
parent 6b46e5204d
commit 6074b1abf2
2 changed files with 8 additions and 0 deletions

View file

@ -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

View file

@ -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" \