On Thu, Mar 31, 2011 at 11:58:29AM +0200, Uros Bizjak wrote: > + /* Even if the stack pointer isn't the CFA register, we need to correctly > + describe the adjustments made to it, in particular differentiate the > + frame-related ones from the frame-unrelated ones. */ > + if (size > 0) > + { > + rtx expr = gen_rtx_SEQUENCE (VOIDmode, rtvec_alloc (2)); > + XVECEXP (expr, 0, 0) > + = gen_rtx_SET (VOIDmode, stack_pointer_rtx, > + plus_constant (stack_pointer_rtx, -size)); > + XVECEXP (expr, 0, 1) > + = gen_rtx_SET (VOIDmode, stack_pointer_rtx, > + plus_constant (stack_pointer_rtx, > + PROBE_INTERVAL + dope + size)); > + add_reg_note (last, REG_FRAME_RELATED_EXPR, expr); > + RTX_FRAME_RELATED_P (last) = 1; > + > + cfun->machine->fs.sp_offset += size; > + } > > Is there a reason why we can't just cancel (+ size and -size) in these > two expressions to: > > XVECEXP (expr, 0, 0) > = gen_rtx_SET (VOIDmode, stack_pointer_rtx, > plus_constant (stack_pointer_rtx, > PROBE_INTERVAL + dope));
Yes, in RTX_FRAME_RELATED_P parallels dwarf2out only looks at RTX_FRAME_RELATED_P sets or the first set. See dwarf2out_frame_debug_expr for more details. Jakub