improve address mode tests
[libfirm] / ir / be / beemitter.c
index 2111b84..344d4a6 100644 (file)
@@ -1,16 +1,37 @@
 /*
- * 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$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include "beemitter.h"
-#include "xmalloc.h"
 #include "irprintf.h"
+#include "ident.h"
+#include "tv.h"
 
 void be_emit_init_env(be_emit_env_t *env, FILE *F)
 {
@@ -34,6 +55,14 @@ void be_emit_ident(be_emit_env_t *env, ident *id)
        be_emit_string_len(env, str, len);
 }
 
+void be_emit_tarval(be_emit_env_t *env, tarval *tv)
+{
+       char buf[64];
+
+       tarval_snprintf(buf, sizeof(buf), tv);
+       be_emit_string(env, buf);
+}
+
 void be_emit_irvprintf(be_emit_env_t *env, const char *fmt, va_list args)
 {
        char buf[256];