On 4/20/21 4:20 PM, Jakub Jelinek via Gcc wrote:
> On Tue, Apr 20, 2021 at 03:27:08PM -0500, William Seurer via Gcc wrote:
>> /tmp/cc8zG8DV.s: Assembler messages:
>> /tmp/cc8zG8DV.s:2566: Error: unsupported relocation against r13
>> /tmp/cc8zG8DV.s:2570: Error: unsupported relocation against r14
[snip]
> So do we need to change
> +        else version (PPC)                                                   
>                                                                               
>                           
> +        {                                                                    
>                                                                               
>                           
> +            void*[19] regs = void;                                           
>                                                                               
>                           
> +            asm pure nothrow @nogc                                           
>                                                                               
>                           
> +            {                                                                
>                                                                               
>                           
> +                "stw r13, %0" : "=m" (regs[ 0]);                             
>                                                                               
>                           
> +                "stw r14, %0" : "=m" (regs[ 1]);                             
>                                                                               
>                           
> ...
> +        else version (PPC64)                                                 
>                                                                               
>                           
> +        {                                                                    
>                                                                               
>                           
> +            void*[19] regs = void;                                           
>                                                                               
>                           
> +            asm pure nothrow @nogc                                           
>                                                                               
>                           
> +            {                                                                
>                                                                               
>                           
> +                "std r13, %0" : "=m" (regs[ 0]);                             
>                                                                               
>                           
> +                "std r14, %0" : "=m" (regs[ 1]);                             
>                                                                               
>                           
> ...
> to "stw 13, %0" and "std 13, %0" etc. unconditionally, or
> to "stw %%r13, %0" etc. under some conditions?

Yes, I think so.  The "r13", etc. names are not accepted by gas unless you
use the -mregnames option.  It's easier to just remove the 'r'.

Peter

Reply via email to