Hi Richard,

> On 21 Nov 2019, at 23:44, Olivier Hainque <hain...@adacore.com> wrote:

>> +/* The pair of scratch registers used for stack probing during prologue.  */
>> +#define PROBE_STACK_FIRST_REG               R10_REGNUM
>> +#define PROBE_STACK_SECOND_REG              R11_REGNUM
>> +
>> 
>> These should be moved to the define_constant in aarch64.md that defines all 
>> the register numbers (add them to near the end of the list where the
>> other aliases are defined.
> 
> Sure, will adjust and retest. Thanks.

Here's an updated version of the patch with your suggestion
incorporated, bootstrapped and regression checked for languages=all
on a native aarch64-linux host.

I replaced the _REG suffix by _REGNUM to match all the other
definitions in aarch64.md, just for consistency.

With Kind Regards,

Olivier

2019-11-07  Olivier Hainque  <hain...@adacore.com>

        * config/aarch64/aarch64.md: Define PROBE_STACK_FIRST_REGNUM
        and PROBE_STACK_SECOND_REGNUM constants, designating r10/r11.
        Replacements for the PROBE_STACK_FIRST/SECOND_REG constants in
        aarch64.c.
        * config/aarch64/aarch64.h (TARGET_OS_USES_R18): New macro,
        default value 0 that target OS configuration files may redefine.
        (STATIC_CHAIN_REGNUM): r9 if TARGET_OS_USES_R18, r18 otherwise.
        * config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG): Remove.
        (PROBE_STACK_SECOND_REG): Remove.
        (aarch64_emit_probe_stack_range): Adjust to the _REG -> _REGNUM
        suffix update for PROBE_STACK register numbers.
        (aarch64_conditional_register_usage): Preserve r18 if the target
        OS uses it, and check that the static chain selection wouldn't
        conflict.

Attachment: aarch64-os-r18.diff
Description: Binary data

Reply via email to