Hi Richard,

> On 19 Oct 2023, at 22:49, Richard Sandiford <richard.sandif...@arm.com> wrote:
> Iain Sandoe <i...@sandoe.co.uk> writes:

>> I am being bitten by a problem that falls out from the code that emits
>> 
>>      .arch Armv8.n-a+crc
>> 
>> when the arch is less than Armv8-r.
>> The code that does this,  in gcc/common/config/aarch64 is quite recent 
>> (2022-09).
> 
> Heh.  A workaround for one assembler bug triggers another assembler bug.

Indeed …  the good news is that the LLVM bug seems fixed on current release 
(17) and main.
The bad news is that it will likely take some to percolate through (and it 
won’t help released
toolsets anyway).

<snip>

>> So, it seems that this ought to be a reasonable configure test:
>> 
>>      .arch armv8.2-a
>>      .text
>> m:
>>      crc32b w0, w1, w2 
>> 
>> and then emit HAS_GAS_AARCH64_CRC_BUG (for example) if that fails to 
>> assemble which can be used to make the +crc emit conditional on a broken 
>> assembler.
> 
> AIUI the problem was in the CPU descriptions, so I don't think this
> would test for the old gas bug that is being worked around.

I see,

> Perhaps instead we could have a configure test for the bug that you've
> found, and disable the crc workaround if so?

OK - I’ll work in that direction, thanks
Iain

> 
> Thanks,
> Richard
> 
>> 
>> - I am asking here before constructing the patch, in case there’s some 
>> reason that doing this at configure time is not acceptable.
>> 
>> thanks
>> Iain

Reply via email to