+ dbg = get_irn_dbg_info(alloc);
+
+ /* we might need to multiply the size with the element size */
+ if(type != get_unknown_type() && get_type_size_bytes(type) != 1) {
+ tarval *tv = new_tarval_from_long(get_type_size_bytes(type), mode_Iu);
+ ir_node *cnst = new_rd_Const(dbg, irg, block, mode_Iu, tv);
+ ir_node *mul = new_rd_Mul(dbg, irg, block, get_Alloc_size(alloc),
+ cnst, mode_Iu);
+ size = mul;
+ } else {
+ size = get_Alloc_size(alloc);
+ }
+
+ /* The stack pointer will be modified in an unknown manner.
+ We cannot omit it. */
+ env->call->flags.bits.try_omit_fp = 0;
+
+ /* FIXME: size must be here round up for the stack alignment, but
+ this must be transmitted from the backend. */
+ stack_alignment = 4;
+ size = adjust_alloc_size(stack_alignment, size, irg, block, dbg);
+ new_alloc = be_new_AddSP(env->isa->sp, irg, block, curr_sp, size);
+ set_irn_dbg_info(new_alloc, dbg);
+
+ if(alloc_mem != NULL) {
+ ir_node *addsp_mem;
+ ir_node *sync;
+
+ addsp_mem = new_r_Proj(irg, block, new_alloc, mode_M, pn_be_AddSP_M);
+
+ /* We need to sync the output mem of the AddSP with the input mem
+ edge into the alloc node. */
+ ins[0] = get_Alloc_mem(alloc);
+ ins[1] = addsp_mem;
+ sync = new_r_Sync(irg, block, 2, ins);
+
+ exchange(alloc_mem, sync);
+ }