Skip to content

Commit 1f61af0

Browse files
committed
testsuite, Darwin, aarch64: Update and add tests for Darwin Arm64.
testsuite, Darwin, Arm64 : Darwin does not support sve at present. Not clear if it will in future. testsuite, Darwin, Arm64 : Fixup tests where the output is different. It's to be expected that the output from scan assembler tests will vary for Darwin - since the object format, assembler syntax and ABI all have differences from ELF/AAPCS64. testsuite, Darwin, Arm64 : Fix up CFString tests for arm64 asm. The codegen tests include scan asms for the required output - these need adjustment for the Arm64 assembler syntax. testsuite, Darwin, Arm64 : Amend segaddr test. The target does not accept no-pie, so we must not try it. testsuite, Darwin, Arm64 : Adjust pubtypes lengths for Arm64. This differs from other Darwin targets CHECKME. testsuite, Darwin, Arm64 : Adjust for revised section spellings. We fixed some section names to change __common -> __bss which affects this testcase. testsuite, Darwin, Arm64 : Disable the AAPCS64 tests. These are not appropriate for darwinpcs / Mach-O. For now, we have compat.exp and struct-layout-1.exp as some coverage, but ideally we should have some specific ones (perhaps some of the AAPCS64 ones can be adapted). testsuite, Darwin, Arm64 : Add U_L_P to bf16 mangling test. gcc/testsuite/ChangeLog * g++.dg/ext/arm-bf16/bf16-mangle-aarch64-1.C: Adjust scan- asms to allow for USER_LABEL_PREFIX and Darwin assembler syntax. testsuite, Darwin, Arm64 : Amend scan-asms for arm syntax. Adjust some objective C tests. testsuite, Darwin, Arm64 : Skip tests with an unsupported API. The "OBJC_OLD_DISPATCH_PROTOTYPES" workaround is explicitly disabled for arm64 in the system headers. testsuite, Darwin, Arm64 : Skip tests with an unsupported API. The "OBJC_OLD_DISPATCH_PROTOTYPES" workaround is explicitly disabled for arm64 in the system headers. testsuite, Objective-C, Darwin, Arm64 : adjust scan-asms for arm64. We need to pick up xword and word instead of quad and long. testsuite, Darwin, Arm64 : Skip two unsupported tests. The compare function bodies code is ELF-specific at present skip the tests until we can make a Mach-O version. gcc/testsuite/ChangeLog: * g++.target/aarch64/no_unique_address_1.C: Skip. * g++.target/aarch64/no_unique_address_2.C: Skip. testsuite, Darwin, Arm64 : Skip more tests using 'check-function-bodies'. The implementation for check-function-bodies doesn't support Mach-O at this point - so this is justy noise. TODO: provide a Mach-O version of the scan asm function. testsuite, Darwin: Amendments for Darwin >= 20. gcc/testsuite/ChangeLog: * gcc.dg/torture/stackalign/builtin-apply-2.c: * lib/target-libpath.exp: Misc test fixes testsuite, Darwin, Arm64: Do not pass -mcmodel=large Testsuite, aarch64: Add correct requirements for bf16 and i8mm gcc/testsuite/ChangeLog: * gcc.target/aarch64/advsimd-intrinsics/bf16_dup.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bf16_get.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bf16_reinterpret.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bfcvt-compile.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bfcvtnq2-untied.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bfdot-1.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bfmlalbt-compile.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/bfmmla-compile.c: Require aarch64_asm_bf16_ok. * gcc.target/aarch64/advsimd-intrinsics/vdot-3-1.c: Require arm_v8_2a_i8mm_neon_hw. testsuite, Darwin, aarch64: Initial mach-o support for check-function-bodies. The scanning code for the function regexes needs different delination criteria for Mach-O c.f. ELF. Darwin also uses the __USER_LABEL_PREFIX__ of '_' which needs acconting in both the scanning and matching patterns. When the code involves page/pageoffs then it is probably necessary to have a separate match for Darwin in some cases. Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/cpymem-size.c: * gcc.target/aarch64/memset-corner-cases-2.c: * gcc.target/aarch64/memset-corner-cases.c: * gcc.target/aarch64/vect-cse-codegen.c: * lib/scanasm.exp: testsuite, Darwin, aarch64: No .cfi_ instruction support on Darwin yet. We have to skip tests for frame instructions at present until the issues with compact unwind support for GCC are resolved. Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/stack-check-cfa-1.c: Skip for Darwin. * gcc.target/aarch64/stack-check-cfa-2.c: Likewise. * gcc.target/aarch64/stack-check-cfa-3.c: Likewise. testsuite, Darwin, aarch64: Match Darwin codegen for aligned object. Darwin uses .zerofill instructions for these. Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/arm_align_max_pwr.c: Match .zerofill on Darwin. testsuite, Darwin, aarch64: More simple test fixes. A few more that just need trivial adjustments for Darwin codegen or asm syntax. Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/c-output-template-2.c: * gcc.target/aarch64/c-output-template-3.c: * gcc.target/aarch64/c-output-template-4.c: * gcc.target/aarch64/dwarf-cfa-reg.c: * gcc.target/aarch64/symbol-range-tiny.c: * gcc.target/aarch64/uaddw-3.c: make the mach-o function scan a bit more robust testsuite, Darwin, aarch64: Update tests after address logic change Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/vect-cse-codegen.c: * gcc.target/aarch64/darwin/darwin.exp: New test. * gcc.target/aarch64/darwin/tu-accesses-0.c: New test. another test fix testsuite, Darwin, aarch64: Skip variant_pcs tests. The __simd__ attribute is not accepted by clang and there is no current description of whether variant CCs would be allowed (I did not see them when last I looked at the LLVM aarch64 darwin call lowering). Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/simd_pcs_attribute-2.c: Skip for Darwin. * gcc.target/aarch64/simd_pcs_attribute-3.c: Likewise. * gcc.target/aarch64/simd_pcs_attribute.c: Likewise. testsuite, Darwin, aarch64: Amend more tests to work on both Linux and Darwin. Darwin does not support big-endian and has a signed char. gcc/testsuite/ChangeLog: * gcc.dg/rtl/aarch64/big-endian-cse-1.c: * gcc.target/aarch64/auto-init-2.c: * gcc.target/aarch64/auto-init-3.c: * gcc.target/aarch64/auto-init-4.c: * gcc.target/aarch64/auto-init-5.c: * gcc.target/aarch64/auto-init-6.c: * gcc.target/aarch64/inline-lrint_1.c: * gcc.target/aarch64/ldp_stp_13.c: * gcc.target/aarch64/no-inline-lrint_1.c: * gcc.target/aarch64/pr100518.c: * gcc.target/aarch64/pr80295.c: * gcc.target/aarch64/pr87305.c: * gcc.target/aarch64/pr94201.c: * gcc.target/aarch64/pr94577.c: * lib/target-supports.exp: * gcc.target/aarch64/pr62308.c: * gcc.target/aarch64/pr78255.c: * gcc.target/aarch64/pr78561.c: testsuite, aarch64, Darwin: Re-enable some scan-function-body tests. Now we have rudimentary support, some of the tests can be renabled. testsuite, Darwin, aarch64: Add a test for darwinpcs d.4. We should not skip registers in the case that we have a 128n value to pass starting on an odd register number. Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/darwin/darwin.exp: Moved to... * gcc.target/aarch64/darwin/aarch64-darwin.exp: ...here. * gcc.target/aarch64/darwin/darwinpcs-d4.c: New test. testsuite, Darwin, aarch64: Initial tests for darwinpcs D2. Tests of packing of small items (char, short, int). Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/darwin/darwinpcs-d2-00.c: New test. * gcc.target/aarch64/darwin/darwinpcs-d2-01.c: New test. testsuite, Darwin, aarch64: Add more tests for darwinpcs. This covers the main four points and initial exercising of variadic function calls. Signed-off-by: Iain Sandoe <[email protected]> gcc/testsuite/ChangeLog: * gcc.target/aarch64/darwin/darwinpcs-d2-00.c: * gcc.target/aarch64/darwin/darwinpcs-d2-01.c: * gcc.target/aarch64/darwin/darwinpcs-d4.c: * gcc.target/aarch64/darwin/tu-accesses-0.c: * gcc.target/aarch64/darwin/complex-in-regs.c: New test. * gcc.target/aarch64/darwin/darwinpcs-d1.c: New test. * gcc.target/aarch64/darwin/darwinpcs-d2-02.c: New test. * gcc.target/aarch64/darwin/darwinpcs-d2-03.c: New test. * gcc.target/aarch64/darwin/darwinpcs-d2-04.c: New test. * gcc.target/aarch64/darwin/darwinpcs-d3.c: New test. * gcc.target/aarch64/darwin/homogeneous-aggr.c: New test. * gcc.target/aarch64/darwin/variadic-00.c: New test. Testsuite: Adjust a Fortran error check gcc/testsuite/ChangeLog * gfortran.dg/pr95690.f90: Adjust error check on aarch64-apple-darwin. Testsuite: skip test gcc/testsuite/ChangeLog: * gcc.dg/builtin-apply2.c: Skip on aarch64-apple-darwin because normal and variadic functions use different arg passing. Testsuite: Fix patterns on stdarg-based tests gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/stdarg-2.c: Adjust pattern. * gcc.dg/tree-ssa/stdarg-4.c: Adjust pattern. * gcc.dg/tree-ssa/stdarg-5.c: Adjust pattern.
1 parent 421198e commit 1f61af0

File tree

109 files changed

+1285
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1285
-134
lines changed

gcc/testsuite/g++.dg/abi/aarch64_guard1.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ int *foo ()
1212
return &x;
1313
}
1414

15-
// { dg-final { scan-assembler _ZGVZ3foovE1x,8,8 } }
15+
// { dg-final { scan-assembler _ZGVZ3foovE1x,8,8 { target { ! *-*-darwin* } } } }
16+
// { dg-final { scan-assembler __DATA,__bss,__ZGVZ3foovE1x,8,3 { target *-*-darwin* } } }
1617
// { dg-final { scan-tree-dump "& 1" "original" } }

gcc/testsuite/g++.dg/abi/arm_va_list.C

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
// #include <stdarg.h>
99
typedef __builtin_va_list va_list;
1010

11-
// { dg-final { scan-assembler "\n_Z1fPSt9__va_list:" } }
11+
// { dg-final { scan-assembler "\n_Z1fPSt9__va_list:" { target { ! *-*-darwin* } } } }
12+
// { dg-final { scan-assembler "\n__Z1fPPc:" { target *-*-darwin* } } }
1213
void f(va_list*) {}
1314

14-
// { dg-final { scan-assembler "\n_Z1gSt9__va_listS_:" } }
15+
// { dg-final { scan-assembler "\n_Z1gSt9__va_listS_:" { target { ! *-*-darwin* } } } }
16+
// { dg-final { scan-assembler "\n__Z1gPcS_:" { target *-*-darwin* } } }
1517
void g(va_list, va_list) {}

gcc/testsuite/g++.dg/ext/arm-bf16/bf16-mangle-aarch64-1.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
/* Test mangling */
44

5-
/* { dg-final { scan-assembler "\t.global\t_Z1fPu6__bf16" } } */
5+
/* { dg-final { scan-assembler {\t.globa?l[ \t]_?_Z1fPu6__bf16} } } */
66
void f (__bf16 *x) { }
77

8-
/* { dg-final { scan-assembler "\t.global\t_Z1gPu6__bf16S_" } } */
8+
/* { dg-final { scan-assembler {\t.globa?l[ \t]_?_Z1gPu6__bf16S_} } } */
99
void g (__bf16 *x, __bf16 *y) { }
1010

11-
/* { dg-final { scan-assembler "\t.global\t_ZN1SIu6__bf16u6__bf16E1iE" } } */
11+
/* { dg-final { scan-assembler {\t.globa?l[ \t]_?_ZN1SIu6__bf16u6__bf16E1iE} } } */
1212
template <typename T, typename U> struct S { static int i; };
1313
template <> int S<__bf16, __bf16>::i = 3;

gcc/testsuite/g++.dg/torture/darwin-cfstring-3.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ void foo(void) {
2626

2727
/* { dg-final { scan-assembler "\\.long\[ \\t\]+___CFConstantStringClassReference\n\[ \\t\]*\\.long\[ \\t\]+1992\n\[ \\t\]*\\.long\[ \\t\]+\[lL\]C.*\n\[ \\t\]*\\.long\[ \\t\]+4\n" { target { *-*-darwin* && { ! lp64 } } } } } */
2828
/* { dg-final { scan-assembler "\\.long\[ \\t\]+___CFConstantStringClassReference\n\[ \\t\]*\\.long\[ \\t\]+1992\n\[ \\t\]*\\.long\[ \\t\]+\[lL\]C.*\n\[ \\t\]*\\.long\[ \\t\]+10\n" { target { *-*-darwin* && { ! lp64 } } } } } */
29-
/* { dg-final { scan-assembler ".quad\t___CFConstantStringClassReference\n\t.long\t1992\n\t.space 4\n\t.quad\t.*\n\t.quad\t4\n" { target { *-*-darwin* && { lp64 } } } } } */
30-
/* { dg-final { scan-assembler ".quad\t___CFConstantStringClassReference\n\t.long\t1992\n\t.space 4\n\t.quad\t.*\n\t.quad\t10\n" { target { *-*-darwin* && { lp64 } } } } } */
29+
/* { dg-final { scan-assembler {.(quad|xword)\t___CFConstantStringClassReference\n\t.(long|word)\t1992\n\t.space 4\n\t.(quad|xword)\t.*\n\t.(quad|xword)\t4\n} { target { *-*-darwin* && { lp64 } } } } } */
30+
/* { dg-final { scan-assembler {.(quad|xword)\t___CFConstantStringClassReference\n\t.(long|word)\t1992\n\t.space 4\n\t.(quad|xword)\t.*\n\t.(quad|xword)\t10\n} { target { *-*-darwin* && { lp64 } } } } } */

gcc/testsuite/g++.target/aarch64/no_unique_address_1.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* { dg-options "-std=c++11 -O -foptimize-sibling-calls -fpeephole2" } */
2-
/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
2+
/* { dg-final { check-function-bodies "**" "" "" { target { lp64 && { ! aarch64*-*-darwin* } } } } } */
33

44
struct X { };
55
struct Y { int : 0; };

gcc/testsuite/g++.target/aarch64/no_unique_address_2.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* { dg-options "-std=c++17 -O -foptimize-sibling-calls -fpeephole2" } */
2-
/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
2+
/* { dg-final { check-function-bodies "**" "" "" { target { lp64 && { ! aarch64*-*-darwin* } } } } } */
33

44
struct X { };
55
struct Y { int : 0; };

gcc/testsuite/g++.target/aarch64/sve/aarch64-sve.exp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if {![istarget aarch64*-*-*] } then {
2525
return
2626
}
2727

28+
# Darwin doesn't support sve
29+
if { [istarget *-*-darwin*] } then {
30+
return
31+
}
32+
2833
# Load support procs.
2934
load_lib g++-dg.exp
3035

gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ if { ![istarget aarch64*-*-*] } {
2424
return
2525
}
2626

27+
# Darwin doesn't support sve
28+
if { [istarget *-*-darwin*] } then {
29+
return
30+
}
31+
2732
# Load support procs.
2833
load_lib g++-dg.exp
2934

gcc/testsuite/g++.target/aarch64/sve/acle/aarch64-sve-acle.exp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ if {![istarget aarch64*-*-*] } {
2525
return
2626
}
2727

28+
# Darwin doesn't support sve
29+
if { [istarget *-*-darwin*] } then {
30+
return
31+
}
32+
2833
# Load support procs.
2934
load_lib g++-dg.exp
3035

gcc/testsuite/g++.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ if { ![istarget aarch64*-*-*] } {
2424
return
2525
}
2626

27+
# Darwin doesn't support sve
28+
if { [istarget *-*-darwin*] } then {
29+
return
30+
}
31+
2732
# Load support procs.
2833
load_lib g++-dg.exp
2934

0 commit comments

Comments
 (0)