1 // The default ABI is aapcs 2 // RUN: %clang -target arm--- %s -### -o %t.o 2>&1 \ 3 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 4 // RUN: %clang -target armeb--- %s -### -o %t.o 2>&1 \ 5 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 6 // RUN: %clang -target thumb--- %s -### -o %t.o 2>&1 \ 7 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 8 // RUN: %clang -target thumbeb--- %s -### -o %t.o 2>&1 \ 9 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 10 11 // MachO targets default to apcs-gnu, except for m-class processors 12 // RUN: %clang -target arm--darwin- -arch armv7s %s -### -o %t.o 2>&1 \ 13 // RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s 14 // RUN: %clang -target thumb--darwin- -arch armv7s %s -### -o %t.o 2>&1 \ 15 // RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s 16 // RUN: %clang -target thumb--darwin- -arch armv7m %s -### -o %t.o 2>&1 \ 17 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 18 19 // Windows targets default to AAPCS, regardless of environment 20 // RUN: %clang -target arm--windows-gnueabi %s -### -o %t.o 2>&1 \ 21 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 22 23 // NetBSD defaults to apcs-gnu, but can also use aapcs 24 // RUN: %clang -target arm--netbsd- %s -### -o %t.o 2>&1 \ 25 // RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s 26 // RUN: %clang -target arm--netbsd-eabi %s -### -o %t.o 2>&1 \ 27 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 28 // RUN: %clang -target arm--netbsd-eabihf %s -### -o %t.o 2>&1 \ 29 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 30 31 // FreeBSD / OpenBSD default to aapcs-linux 32 // RUN: %clang -target arm--freebsd- %s -### -o %t.o 2>&1 \ 33 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 34 // RUN: %clang -target arm--openbsd- %s -### -o %t.o 2>&1 \ 35 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 36 // RUN: %clang -target arm--haiku- %s -### -o %t.o 2>&1 \ 37 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 38 39 // Otherwise, ABI is selected based on environment 40 // RUN: %clang -target arm---android %s -### -o %t.o 2>&1 \ 41 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 42 // RUN: %clang -target arm---gnueabi %s -### -o %t.o 2>&1 \ 43 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 44 // RUN: %clang -target arm---gnueabihf %s -### -o %t.o 2>&1 \ 45 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 46 // RUN: %clang -target arm---musleabi %s -### -o %t.o 2>&1 \ 47 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 48 // RUN: %clang -target arm---musleabihf %s -### -o %t.o 2>&1 \ 49 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 50 // RUN: %clang -target arm---eabi %s -### -o %t.o 2>&1 \ 51 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 52 // RUN: %clang -target arm---eabihf %s -### -o %t.o 2>&1 \ 53 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 54 55 // ABI can be overridden by the -mabi= option 56 // RUN: %clang -target arm---eabi -mabi=apcs-gnu %s -### -o %t.o 2>&1 \ 57 // RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s 58 // RUN: %clang -target arm---gnueabi -mabi=aapcs %s -### -o %t.o 2>&1 \ 59 // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s 60 // RUN: %clang -target arm---eabi -mabi=aapcs-linux %s -### -o %t.o 2>&1 \ 61 // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s 62 63 // CHECK-APCS-GNU: "-target-abi" "apcs-gnu" 64 // CHECK-AAPCS: "-target-abi" "aapcs" 65 // CHECK-AAPCS-LINUX: "-target-abi" "aapcs-linux" 66 67 // RUN: %clang --target=arm---gnueabi -mabi=aapcs -x assembler %s -### -o /dev/null 2>&1 \ 68 // RUN: | FileCheck --check-prefix=CHECK-ASM %s 69 // RUN: %clang --target=arm---gnueabi -mabi=aapcs -x assembler %s -### -o /dev/null -fno-integrated-as 2>&1 \ 70 // RUN: | FileCheck --check-prefix=CHECK-ASM %s 71 72 /// The combination -x assember & -mabi is not implemented, but for GCC compatibility we accept with a warning. 73 // CHECK-ASM: warning: argument unused during compilation: '-mabi={{.*}}' 74