This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PRE_DEC, POST_INC, how to ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]