fixed debug output of unary x87 nodes
[libfirm] / ir / be / ia32 / ia32_gen_decls.c
index ccb911f..94722d2 100644 (file)
@@ -141,7 +141,7 @@ static void do_dump_atomic_init(struct obstack *obst, ir_node *init)
                tv = get_Const_tarval(init);
 
                /* beware of old stuff */
-               assert(! mode_is_reference(mode));
+               //assert(! mode_is_reference(mode));
 
                /* it's a arithmetic value */
                dump_arith_tarval(obst, tv, bytes);
@@ -312,6 +312,7 @@ static void dump_string_cst(struct obstack *obst, entity *ent)
                case '\n': obstack_printf(obst, "\\n"); break;
                case '\r': obstack_printf(obst, "\\r"); break;
                case '\t': obstack_printf(obst, "\\t"); break;
+               case '\\': obstack_printf(obst, "\\\\"); break;
                default  :
                        if (isprint(c))
                                obstack_printf(obst, "%c", c);
@@ -468,7 +469,7 @@ static void dump_global(struct obstack *rdata_obstack, struct obstack *data_obst
                                                                stepsize = (get_type_size_bits(step_type) + 7) >> 3;
 
                                                                /* Search the next free position in vals depending on the information from above (ai). */
-                                                               while (vals[offset]) {
+                                                               while (vals[offset] && aipos >= 0) {
                                                                        if (ai[aipos].visit_cnt < ai[aipos].n_elems) {
                                                                                offset += stepsize;
                                                                                ai[aipos].visit_cnt++;