(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arm/
pragma_arch_attribute_2.c
       1  /* Test for target attribute assembly extension generations.  */
       2  /* { dg-do compile } */
       3  /* { dg-require-effective-target arm_arch_v8a_ok } */
       4  /* { dg-add-options arm_arch_v8a } */
       5  /* { dg-additional-options "-std=gnu99" } */
       6  
       7  #include <stdint.h>
       8  
       9  extern uint32_t bar();
      10  
      11  __attribute__((target("arch=armv8-a+crc"))) uint32_t crc32cw(uint32_t crc, uint32_t val)
      12  {
      13      uint32_t res;
      14      asm("crc32cw %0, %1, %2" : "=r"(res) : "r"(crc), "r"(val));
      15      return res;
      16  }
      17  
      18  uint32_t restored ()
      19  {
      20    return bar();
      21  }
      22  
      23  /* { dg-final { scan-assembler-times {\.arch\s+armv8-a} 3 } } */
      24  /* { dg-final { scan-assembler-times {\.arch_extension\s+crc} 1 } } */
      25