From: Richard Sandiford Date: Tue, 25 Aug 2020 12:31:16 +0000 (+0100) Subject: aarch64: Update the mangling of single SVE vectors and predicates X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dcb043351307001a85fc1e7d56669f5adc9628f7;p=gcc.git aarch64: Update the mangling of single SVE vectors and predicates GCC was implementing an old mangling scheme for single SVE vectors and predicates (based on the Advanced SIMD one). The final definition instead put them in the vendor built-in namespace via the "u" prefix. gcc/ * config/aarch64/aarch64-sve-builtins.cc (DEF_SVE_TYPE): Add a leading "u" to each mangled name. gcc/testsuite/ * g++.target/aarch64/sve/acle/general-c++/mangle_1.C: Add a leading "u" to the mangling of each SVE vector and predicate type. * g++.target/aarch64/sve/acle/general-c++/mangle_2.C: Likewise. * g++.target/aarch64/sve/acle/general-c++/mangle_3.C: Likewise. * g++.target/aarch64/sve/acle/general-c++/mangle_5.C: Likewise. --- diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index c49fcebcd43..3150659bee9 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -101,7 +101,7 @@ struct registered_function_hasher : nofree_ptr_hash /* Information about each single-predicate or single-vector type. */ static CONSTEXPR const vector_type_info vector_types[] = { #define DEF_SVE_TYPE(ACLE_NAME, NCHARS, ABI_NAME, SCALAR_TYPE) \ - { #ACLE_NAME, #ABI_NAME, #NCHARS #ABI_NAME }, + { #ACLE_NAME, #ABI_NAME, "u" #NCHARS #ABI_NAME }, #include "aarch64-sve-builtins.def" }; diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_1.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_1.C index 1a171248585..36dab3c9b71 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_1.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_1.C @@ -16,16 +16,16 @@ void f11(svfloat32_t) {} void f12(svfloat64_t) {} void f13(svbfloat16_t) {} -/* { dg-final { scan-assembler "_Z2f110__SVBool_t:" } } */ -/* { dg-final { scan-assembler "_Z2f210__SVInt8_t:" } } */ -/* { dg-final { scan-assembler "_Z2f311__SVInt16_t:" } } */ -/* { dg-final { scan-assembler "_Z2f411__SVInt32_t:" } } */ -/* { dg-final { scan-assembler "_Z2f511__SVInt64_t:" } } */ -/* { dg-final { scan-assembler "_Z2f611__SVUint8_t:" } } */ -/* { dg-final { scan-assembler "_Z2f712__SVUint16_t:" } } */ -/* { dg-final { scan-assembler "_Z2f812__SVUint32_t:" } } */ -/* { dg-final { scan-assembler "_Z2f912__SVUint64_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1013__SVFloat16_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1113__SVFloat32_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1213__SVFloat64_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1314__SVBfloat16_t:" } } */ +/* { dg-final { scan-assembler "_Z2f1u10__SVBool_t:" } } */ +/* { dg-final { scan-assembler "_Z2f2u10__SVInt8_t:" } } */ +/* { dg-final { scan-assembler "_Z2f3u11__SVInt16_t:" } } */ +/* { dg-final { scan-assembler "_Z2f4u11__SVInt32_t:" } } */ +/* { dg-final { scan-assembler "_Z2f5u11__SVInt64_t:" } } */ +/* { dg-final { scan-assembler "_Z2f6u11__SVUint8_t:" } } */ +/* { dg-final { scan-assembler "_Z2f7u12__SVUint16_t:" } } */ +/* { dg-final { scan-assembler "_Z2f8u12__SVUint32_t:" } } */ +/* { dg-final { scan-assembler "_Z2f9u12__SVUint64_t:" } } */ +/* { dg-final { scan-assembler "_Z3f10u13__SVFloat16_t:" } } */ +/* { dg-final { scan-assembler "_Z3f11u13__SVFloat32_t:" } } */ +/* { dg-final { scan-assembler "_Z3f12u13__SVFloat64_t:" } } */ +/* { dg-final { scan-assembler "_Z3f13u14__SVBfloat16_t:" } } */ diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_2.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_2.C index 6792b8a3133..ad4aaee291f 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_2.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_2.C @@ -14,16 +14,16 @@ void f11(__SVFloat32_t) {} void f12(__SVFloat64_t) {} void f13(__SVBfloat16_t) {} -/* { dg-final { scan-assembler "_Z2f110__SVBool_t:" } } */ -/* { dg-final { scan-assembler "_Z2f210__SVInt8_t:" } } */ -/* { dg-final { scan-assembler "_Z2f311__SVInt16_t:" } } */ -/* { dg-final { scan-assembler "_Z2f411__SVInt32_t:" } } */ -/* { dg-final { scan-assembler "_Z2f511__SVInt64_t:" } } */ -/* { dg-final { scan-assembler "_Z2f611__SVUint8_t:" } } */ -/* { dg-final { scan-assembler "_Z2f712__SVUint16_t:" } } */ -/* { dg-final { scan-assembler "_Z2f812__SVUint32_t:" } } */ -/* { dg-final { scan-assembler "_Z2f912__SVUint64_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1013__SVFloat16_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1113__SVFloat32_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1213__SVFloat64_t:" } } */ -/* { dg-final { scan-assembler "_Z3f1314__SVBfloat16_t:" } } */ +/* { dg-final { scan-assembler "_Z2f1u10__SVBool_t:" } } */ +/* { dg-final { scan-assembler "_Z2f2u10__SVInt8_t:" } } */ +/* { dg-final { scan-assembler "_Z2f3u11__SVInt16_t:" } } */ +/* { dg-final { scan-assembler "_Z2f4u11__SVInt32_t:" } } */ +/* { dg-final { scan-assembler "_Z2f5u11__SVInt64_t:" } } */ +/* { dg-final { scan-assembler "_Z2f6u11__SVUint8_t:" } } */ +/* { dg-final { scan-assembler "_Z2f7u12__SVUint16_t:" } } */ +/* { dg-final { scan-assembler "_Z2f8u12__SVUint32_t:" } } */ +/* { dg-final { scan-assembler "_Z2f9u12__SVUint64_t:" } } */ +/* { dg-final { scan-assembler "_Z3f10u13__SVFloat16_t:" } } */ +/* { dg-final { scan-assembler "_Z3f11u13__SVFloat32_t:" } } */ +/* { dg-final { scan-assembler "_Z3f12u13__SVFloat64_t:" } } */ +/* { dg-final { scan-assembler "_Z3f13u14__SVBfloat16_t:" } } */ diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_3.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_3.C index 8f64f7c2ee2..7aaafeb71eb 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_3.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_3.C @@ -13,6 +13,6 @@ void f2(t2) {} void f3(t3) {} void f4(t1 &a, t2 &b, t3 &c) { a = b = c; } -/* { dg-final { scan-assembler "_Z2f110__SVInt8_t:" } } */ -/* { dg-final { scan-assembler "_Z2f210__SVInt8_t:" } } */ +/* { dg-final { scan-assembler "_Z2f1u10__SVInt8_t:" } } */ +/* { dg-final { scan-assembler "_Z2f2u10__SVInt8_t:" } } */ /* { dg-final { scan-assembler "_Z2f3Dv32_a:" } } */ diff --git a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C index 47c1160d65a..1504cc12f41 100644 --- a/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C +++ b/gcc/testsuite/g++.target/aarch64/sve/acle/general-c++/mangle_5.C @@ -4,5 +4,5 @@ typedef volatile foo bar; foo f (foo x) { return x; } bar g (bar x) { return x; } -/* { dg-final { scan-assembler {_Z1f10__SVInt8_t:\n} } } */ -/* { dg-final { scan-assembler {_Z1g10__SVInt8_t:\n} } } */ +/* { dg-final { scan-assembler {_Z1fu10__SVInt8_t:\n} } } */ +/* { dg-final { scan-assembler {_Z1gu10__SVInt8_t:\n} } } */