A plan for eliminating cc0
Paul Koning
pkoning@equallogic.com
Tue Mar 29 18:17:00 GMT 2005
>>>>> "tm" == tm gccmail <tm_gccmail@kloo.net> writes:
tm> On 25 Mar 2005, Ian Lance Taylor wrote:
>> Safe but very costly. It assumes that every processor has a cheap
>> way to save and restore the condition codes in user mode, which is
>> not necessarily the case. And it assumes that the save and
>> restore can be removed when not required, which is not obvious to
>> me.
tm> Not necessarily.
tm> You need the ability to regenerate the condition code. There's at
tm> least two ways of doing this:
tm> 1. Saving/restoring the condition code
tm> 2. Rematerializing the condition code. This would usually be a
tm> simple load which is faster than the save/load combo of #1.
"is faster" -- on some processors, yes. Not on all. For example, an
MFPS/MTPS pair to a register on a PDP-11 (when available) is likely to
be faster than a load that references memory.
paul
More information about the Gcc
mailing list