Hi Andi,

> On Wed, Dec 17, 2025 at 02:04:43PM +0100, Rainer Orth wrote:
>> Here's the adjusted patch:
>> 
>> Rather than skipping the gcc.target/i386/shift-gf2p8affine-2.c test on
>> Solaris with as, it should require the necessary ISA extensions instead.
>> 
>> Tested on i386-pc-solaris2.11 (as and gas), x86_64-apple-darwin17.7.0,
>> and x86_64-pc-linux-gnu.
>> 
>> Ok for trunk?
>> 
>> I won't assume this is obvious any longer ;-)
>
> It would under test because effective-target is for runtime, so 
> if the assembler supports it and the CPU doesn't it would wrongly
> reject.

you don't seem to have read what I wrote:

* The runtime part is dealt with by test itself using

  if (!__builtin_cpu_supports ("gfni"))
    return 0;

* I have no idea where you get the idea that effective-target keywords
  are for runtime.  As I mentioned, the implementation in
  target-supports.exp is

# Return 1 if gfni instructions can be compiled.
proc check_effective_target_gfni { } {
    return [check_no_compiler_messages gfni object {
        typedef char __v16qi __attribute__ ((__vector_size__ (16)));

        __v16qi
        _mm_gf2p8affineinv_epi64_epi8 (__v16qi __A, __v16qi __B, const int __C)
        {
            return (__v16qi) __builtin_ia32_vgf2p8affineinvqb_v16qi ((__v16qi) 
__A,
                                                                     (__v16qi) 
__B,
                                                                      0);
        }
    } "-mgfni" ]
}

  This is a test if the code above can be *assembled* (see the object
  part above), no runtime check involved.

> We don't really have a effective-assembler-target, but it would be the 
> right thing to have here.

You're certainly wrong here.  Please check the facts first.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to