[wwwdocs] Round 1 of cleaning up "old PROBLEMS"
Andreas Schwab
schwab@suse.de
Sat Nov 13 23:09:00 GMT 2004
Zack Weinberg <zack@codesourcery.com> 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:
f:
link.w %fp,#0
move.l 8(%fp),%a0
move.l (%a0),%a1
add.l 4(%a0),%a1
clr.b (%a1)
unlk %fp
rts
This sequence is smaller than the one generated by gcc, and faster on all
models but the mc68060.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
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."
More information about the Gcc-patches
mailing list