On Friday 16 December 2005 02:35, Andreas Schwab wrote: > Paul Brook <[EMAIL PROTECTED]> writes: > > In m68k.md we have: > > > > ;; Speed up pushing a single byte but leaving four bytes of space. > > > > (define_peephole > > [(set (mem:QI (pre_dec:SI (reg:SI SP_REG))) > > (match_operand:QI 1 "general_operand" "dami")) > > (set (reg:SI SP_REG) (minus:SI (reg:SI SP_REG) (const_int 2)))] > > > > > > The (const_int 2) looks very suspect. Shouldn't this be (const_int 3) ? > > If not, could someone please explain to me what bit of arcane magic I'm > > missing? > > Pushing a byte will actually push a word, i.e "move.b x,-(%sp)" modifies > %sp by two, not one.
Ah, I see. So all post_inc/pre_dec of stack_pointer_rtx should be modified by PUSH_ROUNDING? In dwarf2out.c we use the size of the destination mode without any adjustment: case POST_DEC: if (XEXP (src, 0) == stack_pointer_rtx) { offset = GET_MODE_SIZE (GET_MODE (dest)); Is this a bug in dwarf2out.c? If so the peephole is incorrect for ColdFire, where a byte push only modifies the address register by one. It's very doubtful whether the pattern would ever match, but still. Paul