This is the mail archive of the 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: [wwwdocs] Round 1 of cleaning up "old PROBLEMS"

Zack Weinberg <> writes:

>> with current mainline on m68k at -O2 yields the following, which looks
>> exactly like what this entry is about:
>> f:
>>         link.w %fp,#0
>>         move.l 8(%fp),%a0
>>         move.l (%a0),%a1
>>         move.l 4(%a0),%a0
>>         clr.b (%a0,%a1.l)
>>         unlk %fp
>>         rts
> Can you express an opinion on whether the suggested variant code (in
> this notation,
> f:
>         link.w %fp,#0
>         move.l 8(%fp),%a0
>         add.l 4(%a0),%a0
>         clr.b (%a0)
>         unlk %fp
>         rts

The correct alternative would be this:

        link.w %fp,#0
        move.l 8(%fp),%a0
        move.l (%a0),%a1
        add.l 4(%a0),%a1
        clr.b (%a1)
        unlk %fp

This sequence is smaller than the one generated by gcc, and faster on all
models but the mc68060.


Andreas Schwab, SuSE Labs,
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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