From 523531a40e83b3023ae5911f48388e2490f16cba Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 9 Oct 2008 00:07:21 -0700 Subject: Microcode: Fix a very old bug with parsing external labels in microcode. --- src/arch/micro_asm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/arch/micro_asm.py') diff --git a/src/arch/micro_asm.py b/src/arch/micro_asm.py index 36c9919c0..0982f6b89 100644 --- a/src/arch/micro_asm.py +++ b/src/arch/micro_asm.py @@ -242,7 +242,10 @@ def t_params_PARAMS(t): def t_asm_ID(t): r'[A-Za-z_]\w*' t.type = reserved_map.get(t.value, 'ID') - t.lexer.begin('params') + # If the ID is really "extern", we shouldn't start looking for parameters + # yet. The real ID, the label itself, is coming up. + if t.type != 'EXTERN': + t.lexer.begin('params') return t # If there is a label and you're -not- in the assembler (which would be caught -- cgit v1.2.3 From 975c9e3af869fb2905933c93c4d657e4d7187dad Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 9 Oct 2008 00:07:38 -0700 Subject: Microcode: Fix a silent typo error in the microcode assembler. --- src/arch/micro_asm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/micro_asm.py') diff --git a/src/arch/micro_asm.py b/src/arch/micro_asm.py index 0982f6b89..3433a8076 100644 --- a/src/arch/micro_asm.py +++ b/src/arch/micro_asm.py @@ -141,7 +141,7 @@ def handle_statement(parser, container, statement): try: for label in statement.labels: container.labels[label.text] = microop - if label.extern: + if label.is_extern: container.externs[label.text] = microop container.add_microop(statement.mnemonic, microop) except: -- cgit v1.2.3