[PATCH 3/3] Add power11 tests
Kewen.Lin
linkw@linux.ibm.com
Thu Jun 13 05:54:17 GMT 2024
Hi,
on 2024/6/13 02:56, Michael Meissner wrote:
> On Wed, Jun 12, 2024 at 02:23:18PM +0800, Kewen.Lin wrote:
>> Hi Mike,
>>
>>> +# Return 1 if this is a PowerPC target supporting -mcpu=power11.
>>> +
>>> +proc check_effective_target_power11_ok { } {
>>> + if { ([istarget powerpc*-*-*]) } {
>>> + return [check_no_compiler_messages power11_ok object {
>>> + int main (void) {
>>> + #ifndef _ARCH_PWR11
>>> + #error "-mcpu=power11 is not supported"
>>> + #endif
>>> + return 0;
>>> + }
>>> + } "-mcpu=power11"]
>>> + } else {
>>> + return 0
>>> + }
>>> +}
>>> +
>>
>> I guess the previous comment in [1] was escaped from your radar, as that just
>> one nit on test case, re-posted it as below. :)
>>
>>> Sorry that I didn't catch this before, this effective target looks useless
>>> since its users power11-[123].c are all for compiling and the compilation
>>> doesn't rely on assembler behavior. power11-1.c has checked for _ARCH_PWR11,
>>> maybe we want some cases with "dg-do assemble" to adopt this?
>>
>> [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648943.html
>>
>> BR,
>> Kewen
>
> Using 'object' in the check_effective_target_power11_ok' test means it has to
> assemble the object. Thus, if you have an older assembler that does not
> support ".machine power11", the testsuite will skip these tests.
>
> I just built a GCC using the system assembler instead of a recent binutils that
> includes ".machine power11" support, and the 3 power11 tests are not done due
> to them being UNSUPPORTED.
But all of them are "dg-do compile", it doesn't require any assembler which supports
.machine power11, in other words, all the associated test cases can be tested well
if compiler itself supports power11 (since assembler isn't involved here).
IMHO, power11_ok is only required for dg-do assemble/run test cases.
BR,
Kewen
More information about the Gcc-patches
mailing list