brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.7 KiB · 53b0321 Raw
188 lines · cpp
1/// Check default CC1 and linker options for ppc32.2// RUN: %clang -### -target powerpcle-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefixes=PPC32,PPC32LELNX %s3// RUN: %clang -### -target powerpc-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefixes=PPC32,PPC32BELNX %s4// RUN: %clang -### -target powerpcle-unknown-freebsd13.0 %s 2>&1 | FileCheck --check-prefixes=PPC32,PPC32LEFBSD %s5// RUN: %clang -### -target powerpc-unknown-freebsd13.0 %s 2>&1 | FileCheck --check-prefixes=PPC32,PPC32BEFBSD %s6// PPC32:      "-funwind-tables=2"7// PPC32-SAME: "-mfloat-abi" "hard"8 9// PPC32LELNX-NEXT: "-m" "elf32lppclinux"10// PPC32BELNX-NEXT: "-m" "elf32ppclinux"11// PPC32LEFBSD-NEXT: "-m" "elf32lppc"12// PPC32BEFBSD-NEXT: "-m" "elf32ppc_fbsd"13 14// check -msoft-float option for ppc3215// RUN: %clang -target powerpc-unknown-linux-gnu %s -msoft-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SOFTFLOAT %s16// CHECK-SOFTFLOAT: "-target-feature" "-hard-float"17 18// check -mfloat-abi=soft option for ppc3219// RUN: %clang -target powerpc-unknown-linux-gnu %s -mfloat-abi=soft -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-FLOATABISOFT %s20// CHECK-FLOATABISOFT: "-target-feature" "-hard-float"21 22// check -mhard-float option for ppc3223// RUN: %clang -target powerpc-unknown-linux-gnu %s -mhard-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-HARDFLOAT %s24// CHECK-HARDFLOAT-NOT: "-target-feature" "-hard-float"25 26// check -mfloat-abi=hard option for ppc3227// RUN: %clang -target powerpc-unknown-linux-gnu %s -mfloat-abi=hard -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-FLOATABIHARD %s28// CHECK-FLOATABIHARD-NOT: "-target-feature" "-hard-float"29 30// check combine -mhard-float -msoft-float option for ppc3231// RUN: %clang -target powerpc-unknown-linux-gnu %s -mhard-float -msoft-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-HARDSOFT %s32// CHECK-HARDSOFT: "-target-feature" "-hard-float"33 34// check combine -msoft-float -mhard-float option for ppc3235// RUN: %clang -target powerpc-unknown-linux-gnu %s -msoft-float -mhard-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SOFTHARD %s36// CHECK-SOFTHARD-NOT: "-target-feature" "-hard-float"37 38// check -msecure-plt option for ppc3239// RUN: %clang -target powerpc-unknown-linux-gnu -msecure-plt %s  -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SECUREPLT %s40// CHECK-SECUREPLT: "-target-feature" "+secure-plt"41 42// check -mfloat-abi=x option43// RUN: not %clang --target=powerpc-unknown-linux-gnu %s -mfloat-abi=x -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-ERRMSG %s44// CHECK-ERRMSG: error: invalid float ABI '-mfloat-abi=x'45 46 47/// Check default CC1 and linker options for ppc64.48// RUN: %clang -### -target powerpc64le-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefixes=PPC64,PPC64LE %s49// RUN: %clang -### -target powerpc64-unknown-linux-gnu %s 2>&1 | FileCheck --check-prefixes=PPC64,PPC64BE %s50// PPC64:      "-funwind-tables=2"51// PPC64-SAME: "-mfloat-abi" "hard"52 53// PPC64LE: "-m" "elf64lppc"54// PPC64BE: "-m" "elf64ppc"55 56// check -msoft-float option for ppc6457// RUN: %clang -target powerpc64-unknown-linux-gnu %s -msoft-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SOFTFLOAT64 %s58// CHECK-SOFTFLOAT64: "-target-feature" "-hard-float"59 60// check -mfloat-abi=soft option for ppc6461// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mfloat-abi=soft -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-FLOATABISOFT64 %s62// CHECK-FLOATABISOFT64: "-target-feature" "-hard-float"63 64// check -msoft-float option for ppc6465// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -msoft-float -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-SOFTFLOAT64le %s66// CHECK-SOFTFLOAT64le: "-target-feature" "-hard-float"67 68// check -mfloat-abi=soft option for ppc6469// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -mfloat-abi=soft -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-FLOATABISOFT64le %s70// CHECK-FLOATABISOFT64le: "-target-feature" "-hard-float"71 72// Check that -mno-altivec correctly disables the altivec target feature on powerpc.73 74// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-altivec -maltivec -### -o %t.o 2>&1 | FileCheck --check-prefix=ALTIVEC %s75// ALTIVEC: "-target-feature" "+altivec"76 77// RUN: %clang -### -c -target powerpc64-unknown-linux-gnu %s -maltivec -mno-altivec 2>&1 | FileCheck --check-prefix=NO_ALTIVEC %s78// NO_ALTIVEC: "-target-feature" "-altivec"79 80// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-mfcrf -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOMFCRF %s81// CHECK-NOMFCRF: "-target-feature" "-mfocrf"82 83// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-mfcrf -mmfcrf -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-MFCRF %s84// CHECK-MFCRF: "-target-feature" "+mfocrf"85 86// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-isel -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOISEL %s87// CHECK-NOISEL: "-target-feature" "-isel"88 89// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-isel -misel -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-ISEL %s90// CHECK-ISEL: "-target-feature" "+isel"91 92// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-popcntd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOPOPCNTD %s93// CHECK-NOPOPCNTD: "-target-feature" "-popcntd"94 95// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-popcntd -mpopcntd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-POPCNTD %s96// CHECK-POPCNTD: "-target-feature" "+popcntd"97 98// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-fprnd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOFPRND %s99// CHECK-NOFPRND: "-target-feature" "-fprnd"100 101// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-fprnd -mfprnd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-FPRND %s102// CHECK-FPRND: "-target-feature" "+fprnd"103 104// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-cmpb -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCMPB %s105// CHECK-NOCMPB: "-target-feature" "-cmpb"106 107// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-cmpb -mcmpb -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CMPB %s108// CHECK-CMPB: "-target-feature" "+cmpb"109 110// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOVSX %s111// CHECK-NOVSX: "-target-feature" "-vsx"112 113// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -mvsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-VSX %s114// CHECK-VSX: "-target-feature" "+vsx"115 116// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-htm -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOHTM %s117// CHECK-NOHTM: "-target-feature" "-htm"118 119// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-htm -mhtm -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-HTM %s120// CHECK-HTM: "-target-feature" "+htm"121 122// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power8-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOP8VECTOR %s123// CHECK-NOP8VECTOR: "-target-feature" "-power8-vector"124 125// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power8-vector -mpower8-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-P8VECTOR %s126// CHECK-P8VECTOR: "-target-feature" "+power8-vector"127 128// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power10-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOP10VECTOR %s129// CHECK-NOP10VECTOR: "-target-feature" "-power10-vector"130 131// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-power10-vector -mpower10-vector -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-P10VECTOR %s132// CHECK-P10VECTOR: "-target-feature" "+power10-vector"133 134// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s135// CHECK-NOCRBITS: "-target-feature" "-crbits"136 137// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -mcrbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s138// CHECK-CRBITS: "-target-feature" "+crbits"139 140// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-longcall -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOLONGCALL %s141// CHECK-NOLONGCALL: "-target-feature" "-longcall"142 143// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-longcall -mlongcall -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-LONGCALL %s144// CHECK-LONGCALL: "-target-feature" "+longcall"145 146// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-invariant-function-descriptors -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOINVFUNCDESC %s147// CHECK-NOINVFUNCDESC: "-target-feature" "-invariant-function-descriptors"148 149// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-invariant-function-descriptors -minvariant-function-descriptors -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-INVFUNCDESC %s150// CHECK-INVFUNCDESC: "-target-feature" "+invariant-function-descriptors"151 152// RUN: %clang -target powerpc %s -mno-spe -mspe -c -### 2>&1 | FileCheck -check-prefix=CHECK-SPE %s153// RUN: %clang -target powerpcspe %s -c -### 2>&1 | FileCheck -check-prefix=CHECK-SPE %s154// RUN: %clang -target powerpcspe %s -mno-spe -c -### 2>&1 | FileCheck -check-prefix=CHECK-NOSPE %s155// CHECK-SPE: "-target-feature" "+spe"156// CHECK-NOSPE: "-target-feature" "-spe"157 158// RUN: %clang -target powerpc %s -mefpu2 -c -### 2>&1 | FileCheck -check-prefix=CHECK-EFPU2 %s159// CHECK-EFPU2: "-target-feature" "+efpu2"160 161// Assembler features162// RUN: %clang -target powerpc-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_32_BE_AS_ARGS %s163// CHECK_32_BE_AS_ARGS: "-mppc"164// CHECK_32_BE_AS_ARGS-SAME: "-mbig-endian"165// CHECK_32_BE_AS_ARGS-SAME: "-many"166 167// RUN: %clang -target powerpcle-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_32_LE_AS_ARGS %s168// CHECK_32_LE_AS_ARGS: "-mppc"169// CHECK_32_LE_AS_ARGS-SAME: "-mlittle-endian"170// CHECK_32_LE_AS_ARGS-SAME: "-many"171 172// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_64_BE_AS_ARGS %s173// CHECK_64_BE_AS_ARGS: "-mppc64"174// CHECK_64_BE_AS_ARGS-SAME: "-mbig-endian"175// CHECK_64_BE_AS_ARGS-SAME: "-many"176 177// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o -no-integrated-as 2>&1 | FileCheck -check-prefix=CHECK_64_LE_AS_ARGS %s178// CHECK_64_LE_AS_ARGS: "-mppc64"179// CHECK_64_LE_AS_ARGS-SAME: "-mlittle-endian"180// CHECK_64_LE_AS_ARGS-SAME: "-mpower8"181 182// OpenMP features183// RUN: %clang -target powerpc-unknown-linux-gnu %s -### -fopenmp=libomp -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_OPENMP_TLS %s184// RUN: %clang -target powerpcle-unknown-linux-gnu %s -### -fopenmp=libomp -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_OPENMP_TLS %s185// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -fopenmp=libomp -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_OPENMP_TLS %s186// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -fopenmp=libomp -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_OPENMP_TLS %s187// CHECK_OPENMP_TLS-NOT: "-fnoopenmp-use-tls"188