This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: PRE_DEC, POST_INC, how to ?
- From: Ian Lance Taylor <iant at google dot com>
- To: Florent DEFAY <spira dot inhabitant at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 13 May 2009 07:44:52 -0700
- Subject: Re: PRE_DEC, POST_INC, how to ?
- References: <8502af3c0905130611y10afa184v39e6f471b7eb256@mail.gmail.com>
Florent DEFAY <spira.inhabitant@gmail.com> writes:
> Then I sometimes get valid code like:
> move r1,-(r0)
> move r1,-2(r0)
> move r2,r0
>
> But only with optimization options.
Auto-increment/decrement addressing is only introduced when optimizing.
> Moreover, the previous example would be better coded with:
> move r1,-(r0)
> move r1,-(r0)
> move r2,r0
Yeah, the auto-increment/decrement optimizations aren't all that good in
gcc, because they don't much matter for most popular processors. The
place to start looking is auto-inc-dec.c.
Ian