This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Conditional call instruction
- From: Dale Johannesen <dalej at apple dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: Dale Johannesen <dalej at apple dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 13 Feb 2002 15:00:00 -0800
- Subject: Re: Conditional call instruction
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.