projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: Clean up VFP
[gem5.git]
/
src
/
arch
/
micro_asm.py
diff --git
a/src/arch/micro_asm.py
b/src/arch/micro_asm.py
index 36c9919c095e766b0bf38c05d15c995d34160d80..4e5400ceffe8d075ecf935cc64f6b9968aef7184 100644
(file)
--- a/
src/arch/micro_asm.py
+++ b/
src/arch/micro_asm.py
@@
-34,10
+34,6
@@
import traceback
# get type names
from types import *
# get type names
from types import *
-# Prepend the directory where the PLY lex & yacc modules are found
-# to the search path.
-sys.path[0:0] = [os.environ['M5_PLY']]
-
from ply import lex
from ply import yacc
from ply import lex
from ply import yacc
@@
-141,7
+137,7
@@
def handle_statement(parser, container, statement):
try:
for label in statement.labels:
container.labels[label.text] = microop
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:
container.externs[label.text] = microop
container.add_microop(statement.mnemonic, microop)
except:
@@
-242,7
+238,10
@@
def t_params_PARAMS(t):
def t_asm_ID(t):
r'[A-Za-z_]\w*'
t.type = reserved_map.get(t.value, 'ID')
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
return t
# If there is a label and you're -not- in the assembler (which would be caught