+ block = get_nodes_block(free);
+ irg = get_irn_irg(block);
+ type = get_Free_type(free);
+ sp_mode = env->isa->sp->reg_class->mode;
+
+ /* 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(NULL, irg, block, mode_Iu, tv);
+ ir_node *mul = new_rd_Mul(NULL, irg, block, get_Free_size(free),
+ cnst, mode_Iu);
+ size = mul;
+ } else {
+ size = get_Free_size(free);
+ }
+
+ /* The stack pointer will be modified in an unknown manner.
+ We cannot omit it. */
+ env->call->flags.bits.try_omit_fp = 0;
+ subsp = be_new_SubSP(env->isa->sp, irg, block, curr_sp, size);
+
+ mem = new_r_Proj(irg, block, subsp, mode_M, pn_be_SubSP_M);
+ res = new_r_Proj(irg, block, subsp, sp_mode, pn_be_SubSP_res);
+
+ /* we need to sync the memory */
+ in[0] = get_Free_mem(free);
+ in[1] = mem;
+ sync = new_r_Sync(irg, block, 2, in);
+
+ /* and make the AddSP dependent on the former memory */
+ add_irn_dep(subsp, get_Free_mem(free));
+
+ /* kill the free */
+ exchange(free, sync);
+ curr_sp = res;
+