76 lines · c
1// The default ABI is aapcs2// RUN: %clang -target arm--- %s -### -o %t.o 2>&1 \3// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s4// RUN: %clang -target armeb--- %s -### -o %t.o 2>&1 \5// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s6// RUN: %clang -target thumb--- %s -### -o %t.o 2>&1 \7// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s8// RUN: %clang -target thumbeb--- %s -### -o %t.o 2>&1 \9// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s10 11// MachO targets default to apcs-gnu, except for m-class processors12// RUN: %clang -target arm--darwin- -arch armv7s %s -### -o %t.o 2>&1 \13// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s14// RUN: %clang -target thumb--darwin- -arch armv7s %s -### -o %t.o 2>&1 \15// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s16// RUN: %clang -target thumb--darwin- -arch armv7m %s -### -o %t.o 2>&1 \17// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s18 19// Windows targets default to AAPCS, regardless of environment20// RUN: %clang -target arm--windows-gnueabi %s -### -o %t.o 2>&1 \21// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s22 23// NetBSD defaults to apcs-gnu, but can also use aapcs24// RUN: %clang -target arm--netbsd- %s -### -o %t.o 2>&1 \25// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s26// RUN: %clang -target arm--netbsd-eabi %s -### -o %t.o 2>&1 \27// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s28// RUN: %clang -target arm--netbsd-eabihf %s -### -o %t.o 2>&1 \29// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s30 31// FreeBSD / OpenBSD default to aapcs-linux32// RUN: %clang -target arm--freebsd- %s -### -o %t.o 2>&1 \33// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s34// RUN: %clang -target arm--fuchsia- %s -### -o %t.o 2>&1 \35// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s36// RUN: %clang -target arm--openbsd- %s -### -o %t.o 2>&1 \37// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s38// RUN: %clang -target arm--haiku- %s -### -o %t.o 2>&1 \39// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s40 41// Otherwise, ABI is selected based on environment42// RUN: %clang -target arm---android %s -### -o %t.o 2>&1 \43// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s44// RUN: %clang -target arm---gnueabi %s -### -o %t.o 2>&1 \45// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s46// RUN: %clang -target arm---gnueabihf %s -### -o %t.o 2>&1 \47// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s48// RUN: %clang -target arm---musleabi %s -### -o %t.o 2>&1 \49// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s50// RUN: %clang -target arm---musleabihf %s -### -o %t.o 2>&1 \51// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s52// RUN: %clang -target arm---eabi %s -### -o %t.o 2>&1 \53// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s54// RUN: %clang -target arm---eabihf %s -### -o %t.o 2>&1 \55// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s56 57// ABI can be overridden by the -mabi= option58// RUN: %clang -target arm---eabi -mabi=apcs-gnu %s -### -o %t.o 2>&1 \59// RUN: | FileCheck -check-prefix=CHECK-APCS-GNU %s60// RUN: %clang -target arm---gnueabi -mabi=aapcs %s -### -o %t.o 2>&1 \61// RUN: | FileCheck -check-prefix=CHECK-AAPCS %s62// RUN: %clang -target arm---eabi -mabi=aapcs-linux %s -### -o %t.o 2>&1 \63// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s64 65// CHECK-APCS-GNU: "-target-abi" "apcs-gnu"66// CHECK-AAPCS: "-target-abi" "aapcs"67// CHECK-AAPCS-LINUX: "-target-abi" "aapcs-linux"68 69// RUN: %clang --target=arm---gnueabi -mabi=aapcs -x assembler %s -### -o /dev/null 2>&1 \70// RUN: | FileCheck --check-prefix=CHECK-ASM %s71// RUN: %clang --target=arm---gnueabi -mabi=aapcs -x assembler %s -### -o /dev/null -fno-integrated-as 2>&1 \72// RUN: | FileCheck --check-prefix=CHECK-ASM %s73 74/// The combination -x assember & -mabi is not implemented, but for GCC compatibility we accept with a warning.75// CHECK-ASM: warning: argument unused during compilation: '-mabi={{.*}}'76