summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-02-21 22:59:04 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-06-05 18:35:36 +0200
commit84fcb507329f850030295a80295a2994bceebd25 (patch)
tree852e32d9c58e680e8f9ee1c3907392218c850c9c /ir/be/beasm.c
parent3a821ba5f6857c4341983de58cb1402e05c8e8b1 (diff)
be: Handle '%=' in asm.
Diffstat (limited to 'ir/be/beasm.c')
-rw-r--r--ir/be/beasm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ir/be/beasm.c b/ir/be/beasm.c
index 6872283..634a1b5 100644
--- a/ir/be/beasm.c
+++ b/ir/be/beasm.c
@@ -314,6 +314,15 @@ void be_emit_asm(ir_node const *const asmn, be_emit_asm_operand_func *const emit
be_emit_char(*s++);
break;
+ case '=':
+ /* From gcc source:
+ * %= outputs a number which is unique to each insn in the entire
+ * compilation. This is useful for making local labels that are
+ * referred to more than once in a given insn. */
+ ++s; /* Skip '='. */
+ be_emit_irprintf("%ld", get_irn_node_nr(asmn));
+ break;
+
default: {
char const modifier = isalpha((unsigned char)*s) ? *s++ : '\0';
unsigned pos;