]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Reorder an entry in aarch64-option-extensions.def
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 29 Sep 2022 10:32:54 +0000 (11:32 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 29 Sep 2022 10:32:54 +0000 (11:32 +0100)
aarch64-option-extensions.def was topologically sorted except
for one case: crypto came before its aes and sha2 dependencies.
This patch moves crypto after sha2 instead.

gcc/
* config/aarch64/aarch64-option-extensions.def: Move crypto
after sha2.

gcc/testsuite/
* gcc.target/aarch64/cpunative/native_cpu_0.c: Expect +crypto
to come after +crc.
* gcc.target/aarch64/cpunative/native_cpu_13.c: Likewise.
* gcc.target/aarch64/cpunative/native_cpu_16.c: Likewise.
* gcc.target/aarch64/cpunative/native_cpu_17.c: Likewise.
* gcc.target/aarch64/cpunative/native_cpu_6.c: Likewise.
* gcc.target/aarch64/cpunative/native_cpu_7.c: Likewise.
* gcc.target/aarch64/options_set_2.c: Likewise.
* gcc.target/aarch64/options_set_3.c: Likewise.
* gcc.target/aarch64/options_set_4.c: Likewise.

gcc/config/aarch64/aarch64-option-extensions.def
gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c
gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c
gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_16.c
gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_17.c
gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c
gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c
gcc/testsuite/gcc.target/aarch64/options_set_2.c
gcc/testsuite/gcc.target/aarch64/options_set_3.c
gcc/testsuite/gcc.target/aarch64/options_set_4.c

index b98008127387b45e1603df9fcde60bdc52165782..df2c8d19b8d397c0e9430f6d18e641e5edbd002f 100644 (file)
@@ -76,16 +76,6 @@ AARCH64_OPT_EXTENSION("simd", AARCH64_FL_SIMD, AARCH64_FL_FP, \
                      AARCH64_FL_I8MM | AARCH64_FL_F32MM | AARCH64_FL_F64MM, \
                      false, "asimd")
 
-/* Enabling "crypto" also enables "fp", "simd", "aes" and "sha2".
-   Disabling "crypto" disables "crypto", "aes", "sha2", "sha3" and "sm3/sm4",
-   "sve2-aes", "sve2-sha3", "sve2-sm4".  */
-AARCH64_OPT_EXTENSION("crypto", AARCH64_FL_CRYPTO, AARCH64_FL_FP | \
-                     AARCH64_FL_SIMD | AARCH64_FL_AES | AARCH64_FL_SHA2, \
-                     AARCH64_FL_AES | AARCH64_FL_SHA2 | AARCH64_FL_SHA3 | \
-                     AARCH64_FL_SM4 | AARCH64_FL_SVE2_AES | \
-                     AARCH64_FL_SVE2_SHA3 | AARCH64_FL_SVE2_SM4, true, \
-                     "aes pmull sha1 sha2")
-
 /* Enabling or disabling "crc" only changes "crc".  */
 AARCH64_OPT_EXTENSION("crc", AARCH64_FL_CRC, 0, 0, false, "crc32")
 
@@ -127,6 +117,16 @@ AARCH64_OPT_EXTENSION("sha2", AARCH64_FL_SHA2, AARCH64_FL_FPSIMD, \
                      AARCH64_FL_CRYPTO | AARCH64_FL_SHA3 | \
                      AARCH64_FL_SVE2_SHA3, false, "sha1 sha2")
 
+/* Enabling "crypto" also enables "fp", "simd", "aes" and "sha2".
+   Disabling "crypto" disables "crypto", "aes", "sha2", "sha3" and "sm3/sm4",
+   "sve2-aes", "sve2-sha3", "sve2-sm4".  */
+AARCH64_OPT_EXTENSION("crypto", AARCH64_FL_CRYPTO, AARCH64_FL_FP | \
+                     AARCH64_FL_SIMD | AARCH64_FL_AES | AARCH64_FL_SHA2, \
+                     AARCH64_FL_AES | AARCH64_FL_SHA2 | AARCH64_FL_SHA3 | \
+                     AARCH64_FL_SM4 | AARCH64_FL_SVE2_AES | \
+                     AARCH64_FL_SVE2_SHA3 | AARCH64_FL_SVE2_SM4, true, \
+                     "aes pmull sha1 sha2")
+
 /* Enabling "sha3" enables "simd" and "sha2".
    Disabling "sha3" disables "sha3" and "sve2-sha3".  */
 AARCH64_OPT_EXTENSION("sha3", AARCH64_FL_SHA3, AARCH64_FL_FPSIMD | \
index f155f51bae734a62b39867fc1a0adec65fb552de..8499f87c39b173491a89626af56f4e193b1d12b5 100644 (file)
@@ -7,6 +7,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto} } } */
 
 /* Test a normal looking procinfo.  */
index b7b3a8e13dfbda887f80b9e5c8f5416c153e0d65..551669091c7010379a4c5247a27c517c4e67ef98 100644 (file)
@@ -7,6 +7,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto} } } */
 
 /* Test one with mixed order of feature bits.  */
index a424e7c56c782ca6e6917248e2fa7a18eb94e06a..2f963bb2312711691f6f1c5989a100b88671ad52 100644 (file)
@@ -7,6 +7,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod\+sve2} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto\+sve2} } } */
 
 /* Test a normal looking procinfo.  */
index c269c5fef7f4ed0686f4f39d05952364c5682e54..c68a697aa3e97ef52fd7e90233c5bb4ac8dbddd9 100644 (file)
@@ -7,6 +7,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod\+sve2} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+crc\+dotprod\+crypto\+sve2} } } */
 
 /* Test a normal looking procinfo.  */
index da72052e62385c9251d25f792b679263a18d9e61..7608e8845a662219488effcdb8277006dcf457a9 100644 (file)
@@ -7,7 +7,7 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+fp16} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+fp16\+crypto} } } */
 
 /* Test one where the feature bits for crypto and fp16 are given in
    same order as declared in options file.  */
index 96ad4c14db16468df30cc0a00d709ed5e2f32ed9..72b14b4f6ed0d50a4fc8a35931fbd232b09d2b61 100644 (file)
@@ -7,7 +7,7 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+fp16} } } */
+/* { dg-final { scan-assembler {\.arch armv8-a\+fp16\+crypto} } } */
 
 /* Test one where the crypto and fp16 options are specified in different
    order from what is in the options file.  */
index 3476febce706b34430682e879a4aa3aac8f752db..f82cb5f7823b47d890046d077f2f47f45cb69803 100644 (file)
@@ -6,6 +6,6 @@ int main ()
   return 0;
 }
 
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */
 
 /* Check to see if crc and crypto are maintained if crypto specified.  */
index 4558339f16c19555801899c357c50cedb23c28b0..7d350cfa36168a4d3e61357bc192ed5e18cda620 100644 (file)
@@ -6,6 +6,6 @@ int main ()
   return 0;
 }
 
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */
 
 /* Check if smallest set is maintained when outputting. */
index 15514bfe93e61e63cbce1262ee951358cd22d6ce..5370e02e1531dd26e5a5fb37de0bab6aed513b71 100644 (file)
@@ -6,7 +6,7 @@ int main ()
   return 0;
 }
 
-/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crypto\+crc} 1 } } */
+/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */
 
 /* Check if individual bits that make up a grouping is specified that only the
-   grouping is kept. */
\ No newline at end of file
+   grouping is kept. */