diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-08-26 20:39:55 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-08-26 20:39:55 -0700 |
commit | 8b738f7f125a90b482aa7b3637cd5c49d78701fe (patch) | |
tree | c22d112c303a7097b6f11ea1943cacb4553b5d66 /src/arch/micro_asm.py | |
parent | 03880cf828d747a68c013c05003a51266ef9a512 (diff) | |
download | gem5-8b738f7f125a90b482aa7b3637cd5c49d78701fe.tar.xz |
X86: Make the microassembler accept lines which are just labels.
The labels on these lines will be associated with whatever the next microop
is.
--HG--
extra : convert_revision : 80c260e48ec1c16e6325061608e37c95a0610cfa
Diffstat (limited to 'src/arch/micro_asm.py')
-rw-r--r-- | src/arch/micro_asm.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/arch/micro_asm.py b/src/arch/micro_asm.py index 32dd79fdf..925e6b585 100644 --- a/src/arch/micro_asm.py +++ b/src/arch/micro_asm.py @@ -140,9 +140,9 @@ def handle_statement(parser, container, statement): raise try: for label in statement.labels: - container.labels[label.name] = microop + container.labels[label.text] = microop if label.extern: - container.externs[label.name] = microop + container.externs[label.text] = microop container.add_microop(microop) except: print_error("Error adding microop.") @@ -439,6 +439,11 @@ def p_labels_1(t): t[1].append(t[2]) t[0] = t[1] +# labels on lines by themselves are attached to the following instruction. +def p_labels_2(t): + 'labels : labels NEWLINE' + t[0] = t[1] + def p_label_0(t): 'label : ID COLON' label = Label() |