copy the debug info when craeting a be_Call form a Call
[libfirm] / ir / be / benode.c
index 70cd604..796cf4d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Backend node support.
  *
- * This file provdies Perm, Copy, Spill and Reload nodes.
+ * This file provides Perm, Copy, Spill and Reload nodes.
  *
  * Copyright (C) 2005 Universitaet Karlsruhe
  * Released under the GPL
@@ -344,7 +344,7 @@ ir_node *be_new_Call(ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *sp, ir_n
        ir_node *irn;
        ir_node **real_in;
 
-       real_in = malloc(sizeof(real_in[0]) * (real_n));
+       real_in = xmalloc(sizeof(real_in[0]) * (real_n));
 
        real_in[0] = mem;
        real_in[1] = sp;
@@ -531,7 +531,7 @@ ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_graph *irg, ir_nod
        in[0] = src;
        memcpy(&in[1], in_keep, n * sizeof(in[0]));
        irn   = new_ir_node(NULL, irg, bl, op_be_CopyKeep, mode, n + 1, in);
-       init_node_attr(irn, n);
+       init_node_attr(irn, n + 1);
        be_node_set_reg_class(irn, OUT_POS(0), cls);
        be_node_set_reg_class(irn, 0, cls);