This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k peephole weirdness
- From: Andreas Schwab <schwab at suse dot de>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 16 Dec 2005 03:35:15 +0100
- Subject: Re: m68k peephole weirdness
- References: <200512152247.58944.paul@codesourcery.com>
Paul Brook <paul@codesourcery.com> 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.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."