*/
#include "config.h"
+#include "bedwarf.h"
#include "beemitter.h"
+#include "be_t.h"
+#include "error.h"
#include "irnode_t.h"
#include "irprintf.h"
#include "ident.h"
obstack_free(&emit_obst, NULL);
}
-void be_emit_ident(ident *id)
-{
- size_t len = get_id_strlen(id);
- const char *str = get_id_str(id);
-
- be_emit_string_len(str, len);
-}
-
-void be_emit_tarval(ir_tarval *tv)
-{
- char buf[64];
-
- tarval_snprintf(buf, sizeof(buf), tv);
- be_emit_string(buf);
-}
-
void be_emit_irvprintf(const char *fmt, va_list args)
{
- char buf[256];
-
- ir_vsnprintf(buf, sizeof(buf), fmt, args);
- be_emit_string(buf);
+ ir_obst_vprintf(&emit_obst, fmt, args);
}
void be_emit_irprintf(const char *fmt, ...)
void be_emit_finish_line_gas(const ir_node *node)
{
- dbg_info *dbg;
- src_loc_t loc;
+ dbg_info *dbg;
+ src_loc_t loc;
- if (node == NULL) {
+ if (node == NULL || !be_options.verbose_asm) {
be_emit_char('\n');
be_emit_write_line();
return;
be_emit_cstring(" */\n");
be_emit_write_line();
}
+
+void be_emit_nothing(ir_node const *const node)
+{
+ (void)node;
+}
+
+void be_emit_node(ir_node const *const node)
+{
+ be_dwarf_location(get_irn_dbg_info(node));
+ ir_op *const op = get_irn_op(node);
+ emit_func *const emit = get_generic_function_ptr(emit_func, op);
+ DEBUG_ONLY(if (!emit) panic("no emit handler for node %+F (%+G, graph %+F)\n", node, node, get_irn_irg(node));)
+ emit(node);
+}