Commit 79b1f6ae authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Make \n in arm_emitf() work.

parent 1d146702
......@@ -275,11 +275,21 @@ void arm_emitf(const ir_node *node, const char *format, ...)
be_emit_char('\t');
for (;;) {
const char *start = format;
while (*format != '%' && *format != '\0')
while (*format != '%' && *format != '\n' && *format != '\0')
++format;
be_emit_string_len(start, format-start);
be_emit_string_len(start, format - start);
if (*format == '\0')
break;
if (*format == '\n') {
++format;
be_emit_char('\n');
be_emit_write_line();
be_emit_char('\t');
continue;
}
++format;
switch (*format++) {
......@@ -375,12 +385,6 @@ void arm_emitf(const ir_node *node, const char *format, ...)
break;
}
case '\n':
be_emit_char('\n');
be_emit_write_line();
be_emit_char('\t');
break;
default:
unknown:
panic("unknown format conversion in arm_emitf()");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment