/*
- * Author: Matthias Braun
- * Date: 12.03.2007
- * Copyright: (c) Universitaet Karlsruhe
- * License: This file is protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 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.
+ */
+
+/**
+ * @file
+ * @brief Interface for assembler output.
+ * @author Matthias Braun
+ * @date 12.03.2007
+ * @version $Id$
*/
#ifndef FIRM_BE_BEEMITTER_H
#define FIRM_BE_BEEMITTER_H
#include <stdio.h>
#include <stdarg.h>
+#include "firm_types.h"
#include "obst.h"
-#include "ident.h"
-#include "irnode.h"
#include "be.h"
/* framework for emitting data (usually the final assembly code) */
int linelength; /**< The length of the current line. */
} be_emit_env_t;
+#define NULL_EMITTER { NULL, NULL_OBST, 0 }
+
/**
* Emit a character to the (assembler) output.
*
* @param env the emitter environment
* @param str the null-terminated string constant
*/
-#define be_emit_cstring(env, str) { be_emit_string_len(env, str, sizeof(str)-1); }
+#define be_emit_cstring(env, str) do { be_emit_string_len(env, str, sizeof(str)-1); } while(0)
/**
* Initializes an emitter environment.
*/
void be_emit_ident(be_emit_env_t *env, ident *id);
+/**
+ * Emit a firm tarval.
+ *
+ * @param env the emitter environment
+ * @param tv the tarval to be emitted
+ */
+void be_emit_tarval(be_emit_env_t *env, tarval *tv);
+
/**
* Emit the output of an ir_printf.
*