summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beemitter.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-05-25 22:20:18 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-05-29 17:35:21 +0200
commita6da8020942bb5b8ebc7e3d357aad0a21922a11d (patch)
tree3bd346e3581044086b3328dbbc273f500a12f430 /ir/be/beemitter.c
parent73db736b279fbc742fb6c839fe8231b29bd7ed17 (diff)
be: Move be_emit_asm() into a separate file for asm handling.
Diffstat (limited to 'ir/be/beemitter.c')
-rw-r--r--ir/be/beemitter.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/ir/be/beemitter.c b/ir/be/beemitter.c
index a46d85c..7627d46 100644
--- a/ir/be/beemitter.c
+++ b/ir/be/beemitter.c
@@ -9,9 +9,6 @@
* @author Matthias Braun
* @date 12.03.2007
*/
-#include <ctype.h>
-
-#include "bediagnostic.h"
#include "bedwarf.h"
#include "beemitter.h"
#include "benode.h"
@@ -19,7 +16,6 @@
#include "panic.h"
#include "irnode_t.h"
#include "irprintf.h"
-#include "ident.h"
#include "tv.h"
#include "dbginfo.h"
#include "util.h"
@@ -106,50 +102,3 @@ void be_emit_node(ir_node const *const node)
DEBUG_ONLY(if (!emit) panic("no emit handler for node %+F (%+G, graph %+F)", node, node, get_irn_irg(node));)
emit(node);
}
-
-void be_emit_asm(ir_node const *const asmn, ident *const text, unsigned const n_operands, be_emit_asm_operand_func *const emit_asm_operand)
-{
- be_emit_cstring("#APP");
- be_emit_finish_line_gas(asmn);
-
- char const *s = get_id_str(text);
- if (s[0] != '\t')
- be_emit_char('\t');
-
- char const *last = s;
- while ((s = strchr(s, '%'))) {
- be_emit_string_len(last, s - last);
- ++s; /* Skip '%'. */
- switch (*s) {
- case '%':
- case '{':
- case '|':
- case '}':
- be_emit_char(*s++);
- break;
-
- default: {
- char const modifier = isalpha((unsigned char)*s) ? *s++ : '\0';
- unsigned pos;
- int p;
- if (sscanf(s, "%u%n", &pos, &p) == 1) {
- s += p;
- if (pos < n_operands) {
- emit_asm_operand(asmn, modifier, pos);
- } else {
- be_errorf(asmn, "asm operand number '%u' out of range", pos);
- }
- } else {
- be_errorf(asmn, "could not parse asm operand number");
- }
- break;
- }
- }
-
- last = s;
- }
- be_emit_string(last);
-
- be_emit_cstring("\n#NO_APP\n");
- be_emit_write_line();
-}