/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
- *
* This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
*/
/**
* @brief Interface for assembler output.
* @author Matthias Braun
* @date 12.03.2007
- * @version $Id$
*
* This is a framework for emitting data (usually the final assembly code)
*/
#include "firm_types.h"
#include "obst.h"
#include "be.h"
+#include "irop_t.h"
/* don't use the following vars directly, they're only here for the inlines */
extern FILE *emit_file;
*/
void be_emit_exit(void);
-/**
- * Emit an ident to the (assembler) output.
- *
- * @param id the ident to be emitted
- */
-void be_emit_ident(ident *id);
-
-/**
- * Emit a firm tarval.
- *
- * @param tv the tarval to be emitted
- */
-void be_emit_tarval(tarval *tv);
-
/**
* Emit the output of an ir_printf.
*
*/
void be_emit_pad_comment(void);
+/**
+ * The type of a emitter function.
+ */
+typedef void emit_func(ir_node const *node);
+
+static inline void be_set_emitter(ir_op *const op, emit_func *const func)
+{
+ set_generic_function_ptr(op, func);
+}
+
+void be_emit_nothing(ir_node const *node);
+
+/**
+ * Emit code for a node.
+ */
+void be_emit_node(ir_node const *node);
+
#endif