made code C89 compliant (changed unnamed union in attributes)
[libfirm] / ir / be / ia32 / ia32_gen_decls.c
index 626215c..911a959 100644 (file)
@@ -21,6 +21,8 @@
 # define obstack_chunk_free free
 #endif
 
+extern int obstack_printf(struct obstack *obst, char *fmt, ...);
+
 #include "tv.h"
 #include "irnode.h"
 #include "entity.h"
@@ -111,41 +113,6 @@ static void dump_arith_tarval(struct obstack *obst, tarval *tv, int bytes)
   }
 }
 
-/*
- * dump an arithmetic tarval
- */
-static void ia32_dump_arith_tarval(struct obstack *obst, tarval *tv, int bytes)
-{
-  switch (bytes) {
-
-  case 1:
-    obstack_printf(obst, "\t.byte\t");
-    break;
-
-  case 2:
-    obstack_printf(obst, "\t.value\t");
-    break;
-
-  case 4:
-    obstack_printf(obst, "\t.long\t");
-    break;
-
-  case 8:
-    obstack_printf(obst, "\t.quad\t");
-    break;
-
-  case 10:
-  case 12:
-    break;
-
-  default:
-    fprintf(stderr, "Try to dump an tarval with %d bytes\n", bytes);
-    assert(0);
-  }
-  dump_arith_tarval(obst, tv, bytes);
-}
-
-
 /*
  * dump an atomic value
  */
@@ -568,6 +535,8 @@ void ia32_gen_decls(FILE *out) {
   obstack_init(&data);
   obstack_init(&comm);
 
+  fprintf(out, "\t.intel_syntax\n");
+
   ia32_dump_globals(&rodata, &data, &comm);
 
   size = obstack_object_size(&data);
@@ -587,7 +556,7 @@ void ia32_gen_decls(FILE *out) {
   size = obstack_object_size(&comm);
   cp   = obstack_finish(&comm);
   if (size > 0) {
-    fprintf(out, "\t.common\n");
+    fprintf(out, "\t.text\n");
     fwrite(cp, 1, size, out);
   }