Commit 05f29a7b authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Move BE_EMITF() from 'beemitter.h' to 'beemithlp.h'.

parent 37b1db4c
......@@ -78,4 +78,25 @@ typedef struct be_cond_branch_projs_t {
be_cond_branch_projs_t be_get_cond_branch_projs(ir_node const *node);
#define BE_EMITF(node, fmt, ap, in_delay_slot) \
va_list ap; \
va_start(ap, fmt); \
be_emit_char('\t'); \
if (in_delay_slot) \
be_emit_char(' '); \
for (size_t node##__n;;) \
if (node##__n = strcspn(fmt, "\n%"), be_emit_string_len(fmt, node##__n), fmt += node##__n, *fmt == '\0') { \
be_emit_finish_line_gas(node); \
va_end(ap); \
break; \
} else if (*fmt == '\n') { \
++fmt; \
be_emit_char('\n'); \
be_emit_write_line(); \
be_emit_char('\t'); \
} else if (*++fmt == '%') { \
++fmt; \
be_emit_char('%'); \
} else
#endif
......@@ -96,25 +96,4 @@ static inline size_t be_emit_get_column(void)
return obstack_object_size(&emit_obst);
}
#define BE_EMITF(node, fmt, ap, in_delay_slot) \
va_list ap; \
va_start(ap, fmt); \
be_emit_char('\t'); \
if (in_delay_slot) \
be_emit_char(' '); \
for (size_t node##__n;;) \
if (node##__n = strcspn(fmt, "\n%"), be_emit_string_len(fmt, node##__n), fmt += node##__n, *fmt == '\0') { \
be_emit_finish_line_gas(node); \
va_end(ap); \
break; \
} else if (*fmt == '\n') { \
++fmt; \
be_emit_char('\n'); \
be_emit_write_line(); \
be_emit_char('\t'); \
} else if (*++fmt == '%') { \
++fmt; \
be_emit_char('%'); \
} else
#endif
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