how to configure GCC to have caller save registers instead of callee prologue

Richard Sandiford richard.sandiford@arm.com
Fri Aug 9 09:10:00 GMT 2019


William Tambe <tambewilliam@gmail.com> writes:
> Could the answer be to define the macro CALL_USED_REGISTERS with all
> bits set to 1 ?

Yeah, that should do it.

Thanks,
Richard

> On Wed, Aug 7, 2019 at 11:57 AM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
>>
>> [ top-post not please do ]
>>
>> On Wed, Aug 07, 2019 at 10:48:58AM -0500, William Tambe wrote:
>> > To expand on my previous reply, I would like to configure GCC so that
>> > a callee does not need to save and restore registers that it is using
>> > other than the frame-pointer and return-pointer registers.
>> > The callee would not need to save and restore registers that it is
>> > using because it would be assumed that the caller has saved all
>> > registers that it is using.
>>
>> Then you need to define a new ABI for your target, and implement that
>> in your target's GCC backend.
>>
>>
>> Segher



More information about the Gcc-help mailing list