summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-17 15:58:21 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-17 16:10:00 +0100
commit3a97c4a28f48253eab826b23bc4a3e1da6b58dd4 (patch)
tree0a5449f33b71ede04bb867bd6529ca29f68542bf
parent8ed9a2f4562c9663bddc58fcdda4f9d95d5bf900 (diff)
Handle labels in normalize_asm_text().
This way they are checked for duplicates and can be referred to by name, instead of just by number, in the template.
-rw-r--r--src/parser/parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser/parser.c b/src/parser/parser.c
index ddc12b7..ee309f0 100644
--- a/src/parser/parser.c
+++ b/src/parser/parser.c
@@ -9260,7 +9260,8 @@ static void normalize_asm_text(asm_statement_t *asm_statement)
unsigned pos = 0;
bool need_normalization = false;
pos = set_asm_operand_entities(pos, &need_normalization, asm_statement->outputs);
- set_asm_operand_entities(pos, &need_normalization, asm_statement->inputs);
+ pos = set_asm_operand_entities(pos, &need_normalization, asm_statement->inputs);
+ set_asm_operand_entities(pos, &need_normalization, asm_statement->labels);
if (!need_normalization) {
asm_statement->normalized_text = asm_statement->asm_text;
@@ -9308,6 +9309,7 @@ static void normalize_asm_text(asm_statement_t *asm_statement)
asm_statement->normalized_text
= finish_string_construction(asm_statement->asm_text->encoding);
+ reset_asm_operand_entities(asm_statement->labels);
reset_asm_operand_entities(asm_statement->inputs);
reset_asm_operand_entities(asm_statement->outputs);
}