Conditional call instruction

Dale Johannesen dalej@apple.com
Wed Feb 13 15:02:00 GMT 2002


On Wednesday, February 13, 2002, at 02:48 PM, Geoff Keating wrote:

> Dale Johannesen <dalej@apple.com> writes:
>
>> On Wednesday, February 13, 2002, at 08:06 AM, Mark Mitchell wrote:
>>
>>> Do any of GCC's currently supported targets have a predicated call
>>> instruction that GCC will use when appropriate?  Roughly speaking,
>>> this is an instruction that calls only if some condition is true,
>>> and otherwise falls through.
>>
>> rs6000/powerpc has this in the architecture, but I've never seen
>> gcc use it.
>
> It is unusable because the range of the call is only 32k.

For the PC-relative branch, that's true, but you can also conditionally
call to the contents of LR or CTR.  It may be that it's better code
not to load those registers when the condition is false, though.



More information about the Gcc mailing list