brintos

brintos / llvm-project-archived public Read only

0
0
Text · 14.9 KiB · 5ec052a Raw
428 lines · c
1// RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -fvisibility=hidden 2>&1 | FileCheck -check-prefix=I386 %s2// I386: "-triple" "i386-unknown-unknown"3// I386: "-Os"4// I386: "-S"5// I386: "-disable-free"6// I386: "-mrelocation-model" "static"7// I386: "-mframe-pointer=all"8// I386: "-funwind-tables=2"9// I386: "-fvisibility=hidden"10// I386: "-o"11// I386: clang-translation12 13// RUN: %clang -target i386-unknown-unknown -### -S %s -o %t.s -Xclang -no-disable-free 2>&1 | FileCheck -check-prefix=FREE %s14// FREE: "-disable-free"15// FREE: "-no-disable-free"16 17// RUN: %clang -target i386-unknown-unknown -### -S %s -fasynchronous-unwind-tables -fno-unwind-tables 2>&1 | FileCheck --check-prefix=UNWIND-TABLES %s --implicit-check-not=warning:18// UNWIND-TABLES: "-funwind-tables=2"19 20// RUN: %clang -target i386-apple-darwin9 -### -S %s -o %t.s 2>&1 | \21// RUN: FileCheck -check-prefix=YONAH %s22// RUN: %clang -target i386-apple-macosx10.11 -### -S %s -o %t.s 2>&1 | \23// RUN: FileCheck -check-prefix=YONAH %s24// YONAH: "-target-cpu"25// YONAH: "yonah"26 27// RUN: %clang -target x86_64-apple-darwin9 -### -S %s -o %t.s 2>&1 | \28// RUN: FileCheck -check-prefix=CORE2 %s29// RUN: %clang -target x86_64-apple-macosx10.11 -### -S %s -o %t.s 2>&1 | \30// RUN: FileCheck -check-prefix=CORE2 %s31// CORE2: "-target-cpu"32// CORE2: "core2"33 34// RUN: %clang -target x86_64h-apple-darwin -### -S %s -o %t.s 2>&1 | \35// RUN: FileCheck -check-prefix=AVX2 %s36// RUN: %clang -target x86_64h-apple-macosx10.12 -### -S %s -o %t.s 2>&1 | \37// RUN: FileCheck -check-prefix=AVX2 %s38// AVX2: "-target-cpu"39// AVX2: "core-avx2"40 41// RUN: %clang -target x86_64h-apple-darwin -march=skx -### %s -o /dev/null 2>&1 | \42// RUN: FileCheck -check-prefix=X8664HSKX %s43// X8664HSKX: "-target-cpu"44// X8664HSKX: "skx"45 46// RUN: %clang -target i386-apple-macosx10.12 -### -S %s -o %t.s 2>&1 | \47// RUN: FileCheck -check-prefix=PENRYN %s48// RUN: %clang -target x86_64-apple-macosx10.12 -### -S %s -o %t.s 2>&1 | \49// RUN: FileCheck -check-prefix=PENRYN %s50// PENRYN: "-target-cpu"51// PENRYN: "penryn"52 53 54// RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 2>&1 | \55// RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s56// ARMV7_DEFAULT: clang57// ARMV7_DEFAULT: "-cc1"58// ARMV7_DEFAULT-NOT: "-msoft-float"59// ARMV7_DEFAULT: "-mfloat-abi" "soft"60// ARMV7_DEFAULT-NOT: "-msoft-float"61// ARMV7_DEFAULT: "-x" "c"62 63// RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \64// RUN: -msoft-float 2>&1 | FileCheck -check-prefix=ARMV7_SOFTFLOAT %s65// ARMV7_SOFTFLOAT: clang66// ARMV7_SOFTFLOAT: "-cc1"67// ARMV7_SOFTFLOAT: "-target-feature"68// ARMV7_SOFTFLOAT: "-neon"69// ARMV7_SOFTFLOAT: "-msoft-float"70// ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"71// ARMV7_SOFTFLOAT: "-x" "c"72 73// RUN: not %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \74// RUN: -mhard-float 2>&1 | FileCheck -check-prefix=ARMV7_HARDFLOAT %s75// ARMV7_HARDFLOAT: clang76// ARMV7_HARDFLOAT: "-cc1"77// ARMV7_HARDFLOAT-NOT: "-msoft-float"78// ARMV7_HARDFLOAT: "-mfloat-abi" "hard"79// ARMV7_HARDFLOAT-NOT: "-msoft-float"80// ARMV7_HARDFLOAT: "-x" "c"81 82// RUN: %clang -target arm64-apple-ios10 -### -S %s -arch arm64 2>&1 | \83// RUN: FileCheck -check-prefix=ARM64-APPLE %s84// ARM64-APPLE: -funwind-tables=185 86// RUN: %clang -target arm64-apple-ios10 -funwind-tables -### -S %s -arch arm64 2>&1 | \87// RUN: FileCheck -check-prefix=ARM64-APPLE-UNWIND %s88// RUN: %clang -target arm64_32-apple-watchos8 -funwind-tables -### -S %s -arch arm64 2>&1 | \89// RUN: FileCheck -check-prefix=ARM64-APPLE-UNWIND %s90// ARM64-APPLE-UNWIND: -funwind-tables=191 92// RUN: %clang -target arm64-apple-ios10 -### -ffreestanding -S %s -arch arm64 2>&1 | \93// RUN: FileCheck -check-prefix=ARM64-FREESTANDING-APPLE %s94//95// RUN: %clang -target arm64-apple-ios10 -### -fno-unwind-tables -ffreestanding -S %s -arch arm64 2>&1 | \96// RUN: FileCheck -check-prefix=ARM64-FREESTANDING-APPLE %s97//98// ARM64-FREESTANDING-APPLE-NOT: -funwind-tables99 100// RUN: %clang -target arm64-apple-ios10 -### -funwind-tables -S %s -arch arm64 2>&1 | \101// RUN: FileCheck -check-prefix=ARM64-EXPLICIT-UWTABLE-APPLE %s102//103// RUN: %clang -target arm64-apple-ios10 -### -ffreestanding -funwind-tables -S %s -arch arm64 2>&1 | \104// RUN: FileCheck -check-prefix=ARM64-EXPLICIT-UWTABLE-APPLE %s105//106// ARM64-EXPLICIT-UWTABLE-APPLE: -funwind-tables107 108// RUN: %clang -target arm64-apple-macosx -### -ffreestanding -fasynchronous-unwind-tables %s 2>&1 | \109// RUN: FileCheck --check-prefix=ASYNC-UNWIND-FREESTANDING %s110//111// ASYNC-UNWIND-FREESTANDING: -funwind-tables=2112 113// Quite weird behaviour, but it's a long-standing default.114// RUN: %clang -target x86_64-apple-macosx -### -fno-unwind-tables %s 2>&1 |\115// RUN: FileCheck --check-prefix=NOUNWIND-IGNORED %s116//117// NOUNWIND-IGNORED: -funwind-tables=2118 119// RUN: %clang -target arm64-apple-ios10 -fno-exceptions -### -S %s -arch arm64 2>&1 | \120// RUN: FileCheck -check-prefix=ARM64-APPLE-EXCEP %s121// ARM64-APPLE-EXCEP-NOT: -funwind-tables122 123// RUN: %clang -target armv7k-apple-watchos4.0 -### -S %s -arch armv7k 2>&1 | \124// RUN: FileCheck -check-prefix=ARMV7K-APPLE %s125// ARMV7K-APPLE: -funwind-tables126 127// RUN: %clang -target arm-linux -### -S %s -march=armv5e 2>&1 | \128// RUN: FileCheck -check-prefix=ARMV5E %s129// ARMV5E: clang130// ARMV5E: "-cc1"131// ARMV5E: "-target-cpu" "arm1022e"132 133// RUN: %clang -target powerpc64-unknown-linux-gnu \134// RUN: -### -S %s -mcpu=G5 2>&1 | FileCheck -check-prefix=PPCG5 %s135// PPCG5: clang136// PPCG5: "-cc1"137// PPCG5: "-target-cpu" "g5"138 139// RUN: %clang -target powerpc64-unknown-linux-gnu \140// RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPWR7 %s141// PPCPWR7: clang142// PPCPWR7: "-cc1"143// PPCPWR7: "-target-cpu" "pwr7"144 145// RUN: %clang -target powerpc64-unknown-linux-gnu \146// RUN: -### -S %s -mcpu=power8 2>&1 | FileCheck -check-prefix=PPCPWR8 %s147// PPCPWR8: clang148// PPCPWR8: "-cc1"149// PPCPWR8: "-target-cpu" "pwr8"150 151// RUN: %clang -target powerpc64-unknown-linux-gnu \152// RUN: -### -S %s -mcpu=630 2>&1 | FileCheck -check-prefix=PPC630 %s153// PPC630: clang154// PPC630: "-cc1"155// PPC630: "-target-cpu" "pwr3"156 157// RUN: %clang -target powerpc64-unknown-linux-gnu \158// RUN: -### -S %s -mcpu=power3 2>&1 | FileCheck -check-prefix=PPCPOWER3 %s159// PPCPOWER3: clang160// PPCPOWER3: "-cc1"161// PPCPOWER3: "-target-cpu" "pwr3"162 163// RUN: %clang -target powerpc64-unknown-linux-gnu \164// RUN: -### -S %s -mcpu=pwr3 2>&1 | FileCheck -check-prefix=PPCPWR3 %s165// PPCPWR3: clang166// PPCPWR3: "-cc1"167// PPCPWR3: "-target-cpu" "pwr3"168 169// RUN: %clang -target powerpc64-unknown-linux-gnu \170// RUN: -### -S %s -mcpu=power4 2>&1 | FileCheck -check-prefix=PPCPOWER4 %s171// PPCPOWER4: clang172// PPCPOWER4: "-cc1"173// PPCPOWER4: "-target-cpu" "pwr4"174 175// RUN: %clang -target powerpc64-unknown-linux-gnu \176// RUN: -### -S %s -mcpu=pwr4 2>&1 | FileCheck -check-prefix=PPCPWR4 %s177// PPCPWR4: clang178// PPCPWR4: "-cc1"179// PPCPWR4: "-target-cpu" "pwr4"180 181// RUN: %clang -target powerpc64-unknown-linux-gnu \182// RUN: -### -S %s -mcpu=power5 2>&1 | FileCheck -check-prefix=PPCPOWER5 %s183// PPCPOWER5: clang184// PPCPOWER5: "-cc1"185// PPCPOWER5: "-target-cpu" "pwr5"186 187// RUN: %clang -target powerpc64-unknown-linux-gnu \188// RUN: -### -S %s -mcpu=pwr5 2>&1 | FileCheck -check-prefix=PPCPWR5 %s189// PPCPWR5: clang190// PPCPWR5: "-cc1"191// PPCPWR5: "-target-cpu" "pwr5"192 193// RUN: %clang -target powerpc64-unknown-linux-gnu \194// RUN: -### -S %s -mcpu=power5x 2>&1 | FileCheck -check-prefix=PPCPOWER5X %s195// PPCPOWER5X: clang196// PPCPOWER5X: "-cc1"197// PPCPOWER5X: "-target-cpu" "pwr5x"198 199// RUN: %clang -target powerpc64-unknown-linux-gnu \200// RUN: -### -S %s -mcpu=pwr5x 2>&1 | FileCheck -check-prefix=PPCPWR5X %s201// PPCPWR5X: clang202// PPCPWR5X: "-cc1"203// PPCPWR5X: "-target-cpu" "pwr5x"204 205// RUN: %clang -target powerpc64-unknown-linux-gnu \206// RUN: -### -S %s -mcpu=power6 2>&1 | FileCheck -check-prefix=PPCPOWER6 %s207// PPCPOWER6: clang208// PPCPOWER6: "-cc1"209// PPCPOWER6: "-target-cpu" "pwr6"210 211// RUN: %clang -target powerpc64-unknown-linux-gnu \212// RUN: -### -S %s -mcpu=pwr6 2>&1 | FileCheck -check-prefix=PPCPWR6 %s213// PPCPWR6: clang214// PPCPWR6: "-cc1"215// PPCPWR6: "-target-cpu" "pwr6"216 217// RUN: %clang -target powerpc64-unknown-linux-gnu \218// RUN: -### -S %s -mcpu=power6x 2>&1 | FileCheck -check-prefix=PPCPOWER6X %s219// PPCPOWER6X: clang220// PPCPOWER6X: "-cc1"221// PPCPOWER6X: "-target-cpu" "pwr6x"222 223// RUN: %clang -target powerpc64-unknown-linux-gnu \224// RUN: -### -S %s -mcpu=pwr6x 2>&1 | FileCheck -check-prefix=PPCPWR6X %s225// PPCPWR6X: clang226// PPCPWR6X: "-cc1"227// PPCPWR6X: "-target-cpu" "pwr6x"228 229// RUN: %clang -target powerpc64-unknown-linux-gnu \230// RUN: -### -S %s -mcpu=power7 2>&1 | FileCheck -check-prefix=PPCPOWER7 %s231// PPCPOWER7: clang232// PPCPOWER7: "-cc1"233// PPCPOWER7: "-target-cpu" "pwr7"234 235// RUN: %clang -target powerpc64-unknown-linux-gnu \236// RUN: -### -S %s -mcpu=powerpc 2>&1 | FileCheck -check-prefix=PPCPOWERPC %s237// PPCPOWERPC: clang238// PPCPOWERPC: "-cc1"239// PPCPOWERPC: "-target-cpu" "ppc"240 241// RUN: %clang -target powerpc64-unknown-linux-gnu \242// RUN: -### -S %s -mcpu=powerpc64 2>&1 | FileCheck -check-prefix=PPCPOWERPC64 %s243// PPCPOWERPC64: clang244// PPCPOWERPC64: "-cc1"245// PPCPOWERPC64: "-target-cpu" "ppc64"246 247// RUN: %clang -target powerpc64-unknown-linux-gnu \248// RUN: -### -S %s 2>&1 | FileCheck -check-prefix=PPC64NS %s249// PPC64NS: clang250// PPC64NS: "-cc1"251// PPC64NS: "-target-cpu" "ppc64"252 253// RUN: %clang -target powerpc-fsl-linux -### -S %s \254// RUN: -mcpu=e500 2>&1 | FileCheck -check-prefix=PPCE500 %s255// PPCE500: clang256// PPCE500: "-cc1"257// PPCE500: "-target-cpu" "e500"258 259// RUN: %clang -target powerpc-fsl-linux -### -S %s \260// RUN: -mcpu=8548 2>&1 | FileCheck -check-prefix=PPC8548 %s261// PPC8548: clang262// PPC8548: "-cc1"263// PPC8548: "-target-cpu" "e500"264 265// RUN: %clang -target powerpc-fsl-linux -### -S %s \266// RUN: -mcpu=e500mc 2>&1 | FileCheck -check-prefix=PPCE500MC %s267// PPCE500MC: clang268// PPCE500MC: "-cc1"269// PPCE500MC: "-target-cpu" "e500mc"270 271// RUN: %clang -target powerpc64-fsl-linux -### -S \272// RUN: %s -mcpu=e5500 2>&1 | FileCheck -check-prefix=PPCE5500 %s273// PPCE5500: clang274// PPCE5500: "-cc1"275// PPCE5500: "-target-cpu" "e5500"276 277// RUN: %clang -target amd64-unknown-openbsd5.2 -### -S %s 2>&1 | \278// RUN: FileCheck -check-prefix=AMD64 %s279// AMD64: clang280// AMD64: "-cc1"281// AMD64: "-triple"282// AMD64: "amd64-unknown-openbsd5.2"283// AMD64: "-funwind-tables=2"284 285// RUN: %clang -target amd64--mingw32 -### -S %s 2>&1 | \286// RUN: FileCheck -check-prefix=AMD64-MINGW %s287// AMD64-MINGW: clang288// AMD64-MINGW: "-cc1"289// AMD64-MINGW: "-triple"290// AMD64-MINGW: "amd64-unknown-windows-gnu"291// AMD64-MINGW: "-funwind-tables=2"292 293// RUN: %clang -target i686-linux-android -### -S %s 2>&1 \294// RUN:        --sysroot=%S/Inputs/basic_android_tree/sysroot \295// RUN:   | FileCheck --check-prefix=ANDROID-X86 %s296// ANDROID-X86: clang297// ANDROID-X86: "-target-cpu" "i686"298// ANDROID-X86: "-target-feature" "+ssse3"299 300// RUN: %clang -target x86_64-linux-android -### -S %s 2>&1 \301// RUN:        --sysroot=%S/Inputs/basic_android_tree/sysroot \302// RUN:   | FileCheck --check-prefix=ANDROID-X86_64 %s303// ANDROID-X86_64: clang304// ANDROID-X86_64: "-target-cpu" "x86-64"305// ANDROID-X86_64: "-target-feature" "+sse4.2"306// ANDROID-X86_64: "-target-feature" "+popcnt"307// ANDROID-X86_64: "-target-feature" "+cx16"308 309// RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \310// RUN: FileCheck -check-prefix=MIPS %s311// MIPS: clang312// MIPS: "-cc1"313// MIPS: "-target-cpu" "mips32r2"314// MIPS: "-mfloat-abi" "hard"315 316// RUN: %clang -target mipsisa32r6-linux-gnu -### -S %s 2>&1 | \317// RUN: FileCheck -check-prefix=MIPSR6 %s318// MIPSR6: clang319// MIPSR6: "-cc1"320// MIPSR6: "-target-cpu" "mips32r6"321// MIPSR6: "-mfloat-abi" "hard"322 323// RUN: %clang -target mipsel-linux-gnu -### -S %s 2>&1 | \324// RUN: FileCheck -check-prefix=MIPSEL %s325// MIPSEL: clang326// MIPSEL: "-cc1"327// MIPSEL: "-target-cpu" "mips32r2"328// MIPSEL: "-mfloat-abi" "hard"329 330// RUN: %clang -target mipsisa32r6el-linux-gnu -### -S %s 2>&1 | \331// RUN: FileCheck -check-prefix=MIPSR6EL %s332// MIPSR6EL: clang333// MIPSR6EL: "-cc1"334// MIPSR6EL: "-target-cpu" "mips32r6"335// MIPSR6EL: "-mfloat-abi" "hard"336 337// RUN: %clang -target mips64-linux-gnu -### -S %s 2>&1 | \338// RUN: FileCheck -check-prefix=MIPS64 %s339// MIPS64: clang340// MIPS64: "-cc1"341// MIPS64: "-target-cpu" "mips64r2"342// MIPS64: "-mfloat-abi" "hard"343 344// RUN: %clang -target mipsisa64r6-linux-gnu -### -S %s 2>&1 | \345// RUN: FileCheck -check-prefix=MIPS64R6 %s346// MIPS64R6: clang347// MIPS64R6: "-cc1"348// MIPS64R6: "-target-cpu" "mips64r6"349// MIPS64R6: "-mfloat-abi" "hard"350 351// RUN: %clang -target mips64el-linux-gnu -### -S %s 2>&1 | \352// RUN: FileCheck -check-prefix=MIPS64EL %s353// MIPS64EL: clang354// MIPS64EL: "-cc1"355// MIPS64EL: "-target-cpu" "mips64r2"356// MIPS64EL: "-mfloat-abi" "hard"357 358// RUN: %clang -target mipsisa64r6el-linux-gnu -### -S %s 2>&1 | \359// RUN: FileCheck -check-prefix=MIPS64R6EL %s360// MIPS64R6EL: clang361// MIPS64R6EL: "-cc1"362// MIPS64R6EL: "-target-cpu" "mips64r6"363// MIPS64R6EL: "-mfloat-abi" "hard"364 365// RUN: %clang -target mips64-linux-gnuabi64 -### -S %s 2>&1 | \366// RUN: FileCheck -check-prefix=MIPS64-GNUABI64 %s367// MIPS64-GNUABI64: clang368// MIPS64-GNUABI64: "-cc1"369// MIPS64-GNUABI64: "-target-cpu" "mips64r2"370// MIPS64-GNUABI64: "-target-abi" "n64"371// MIPS64-GNUABI64: "-mfloat-abi" "hard"372 373// RUN: %clang -target mipsisa64r6-linux-gnuabi64 -### -S %s 2>&1 | \374// RUN: FileCheck -check-prefix=MIPS64R6-GNUABI64 %s375// MIPS64R6-GNUABI64: clang376// MIPS64R6-GNUABI64: "-cc1"377// MIPS64R6-GNUABI64: "-target-cpu" "mips64r6"378// MIPS64R6-GNUABI64: "-target-abi" "n64"379// MIPS64R6-GNUABI64: "-mfloat-abi" "hard"380 381// RUN: %clang -target mips64el-linux-gnuabi64 -### -S %s 2>&1 | \382// RUN: FileCheck -check-prefix=MIPS64EL-GNUABI64 %s383// MIPS64EL-GNUABI64: clang384// MIPS64EL-GNUABI64: "-cc1"385// MIPS64EL-GNUABI64: "-target-cpu" "mips64r2"386// MIPS64EL-GNUABI64: "-target-abi" "n64"387// MIPS64EL-GNUABI64: "-mfloat-abi" "hard"388 389// RUN: %clang -target mipsisa64r6el-linux-gnuabi64 -### -S %s 2>&1 | \390// RUN: FileCheck -check-prefix=MIPS64R6EL-GNUABI64 %s391// MIPS64R6EL-GNUABI64: clang392// MIPS64R6EL-GNUABI64: "-cc1"393// MIPS64R6EL-GNUABI64: "-target-cpu" "mips64r6"394// MIPS64R6EL-GNUABI64: "-target-abi" "n64"395// MIPS64R6EL-GNUABI64: "-mfloat-abi" "hard"396 397// RUN: %clang -target mips64-linux-gnuabin32 -### -S %s 2>&1 | \398// RUN: FileCheck -check-prefix=MIPSN32 %s399// MIPSN32: clang400// MIPSN32: "-cc1"401// MIPSN32: "-target-cpu" "mips64r2"402// MIPSN32: "-target-abi" "n32"403// MIPSN32: "-mfloat-abi" "hard"404 405// RUN: %clang -target mipsisa64r6-linux-gnuabin32 -### -S %s 2>&1 | \406// RUN: FileCheck -check-prefix=MIPSN32R6 %s407// MIPSN32R6: clang408// MIPSN32R6: "-cc1"409// MIPSN32R6: "-target-cpu" "mips64r6"410// MIPSN32R6: "-target-abi" "n32"411// MIPSN32R6: "-mfloat-abi" "hard"412 413// RUN: %clang -target mips64el-linux-gnuabin32 -### -S %s 2>&1 | \414// RUN: FileCheck -check-prefix=MIPSN32EL %s415// MIPSN32EL: clang416// MIPSN32EL: "-cc1"417// MIPSN32EL: "-target-cpu" "mips64r2"418// MIPSN32EL: "-target-abi" "n32"419// MIPSN32EL: "-mfloat-abi" "hard"420 421// RUN: %clang -target mipsisa64r6el-linux-gnuabin32 -### -S %s 2>&1 | \422// RUN: FileCheck -check-prefix=MIPSN32R6EL %s423// MIPSN32R6EL: clang424// MIPSN32R6EL: "-cc1"425// MIPSN32R6EL: "-target-cpu" "mips64r6"426// MIPSN32R6EL: "-target-abi" "n32"427// MIPSN32R6EL: "-mfloat-abi" "hard"428