Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 1 | // RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: grep '"-triple" "i386-unknown-unknown"' %t.log |
| 3 | // RUN: grep '"-S"' %t.log |
| 4 | // RUN: grep '"-disable-free"' %t.log |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 5 | // RUN: grep '"-mrelocation-model" "static"' %t.log |
| 6 | // RUN: grep '"-mdisable-fp-elim"' %t.log |
| 7 | // RUN: grep '"-munwind-tables"' %t.log |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 8 | // RUN: grep '"-Os"' %t.log |
| 9 | // RUN: grep '"-o" .*clang-translation.*' %t.log |
Daniel Dunbar | f219e7c | 2009-11-29 07:18:39 +0000 | [diff] [blame] | 10 | // RUN: grep '"-masm-verbose"' %t.log |
Daniel Dunbar | ba8d861 | 2009-12-03 18:42:11 +0000 | [diff] [blame] | 11 | // RUN: grep '"-fvisibility" "hidden"' %t.log |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 12 | // RUN: %clang -target i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log |
Daniel Dunbar | 38b48af | 2009-12-18 06:30:12 +0000 | [diff] [blame] | 13 | // RUN: grep '"-target-cpu" "yonah"' %t.log |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 14 | // RUN: %clang -target x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log |
Daniel Dunbar | 38b48af | 2009-12-18 06:30:12 +0000 | [diff] [blame] | 15 | // RUN: grep '"-target-cpu" "core2"' %t.log |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 16 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 17 | // RUN: %clang -target x86_64-apple-darwin10 -### -S %s 2> %t.log \ |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 18 | // RUN: -arch armv7 |
| 19 | // RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s < %t.log |
Daniel Dunbar | 8ff5b28 | 2009-12-11 23:00:49 +0000 | [diff] [blame] | 20 | // ARMV7_DEFAULT: clang |
| 21 | // ARMV7_DEFAULT: "-cc1" |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 22 | // ARMV7_DEFAULT-NOT: "-msoft-float" |
| 23 | // ARMV7_DEFAULT: "-mfloat-abi" "soft" |
| 24 | // ARMV7_DEFAULT-NOT: "-msoft-float" |
| 25 | // ARMV7_DEFAULT: "-x" "c" |
| 26 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 27 | // RUN: %clang -target x86_64-apple-darwin10 -### -S %s 2> %t.log \ |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 28 | // RUN: -arch armv7 -msoft-float |
| 29 | // RUN: FileCheck -check-prefix=ARMV7_SOFTFLOAT %s < %t.log |
Daniel Dunbar | 8ff5b28 | 2009-12-11 23:00:49 +0000 | [diff] [blame] | 30 | // ARMV7_SOFTFLOAT: clang |
| 31 | // ARMV7_SOFTFLOAT: "-cc1" |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 32 | // ARMV7_SOFTFLOAT: "-msoft-float" |
| 33 | // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft" |
Daniel Dunbar | 7187fac | 2011-03-17 00:07:34 +0000 | [diff] [blame] | 34 | // ARMV7_SOFTFLOAT: "-target-feature" |
| 35 | // ARMV7_SOFTFLOAT: "-neon" |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 36 | // ARMV7_SOFTFLOAT: "-x" "c" |
| 37 | |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 38 | // RUN: %clang -target x86_64-apple-darwin10 -### -S %s 2> %t.log \ |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 39 | // RUN: -arch armv7 -mhard-float |
| 40 | // RUN: FileCheck -check-prefix=ARMV7_HARDFLOAT %s < %t.log |
Daniel Dunbar | 8ff5b28 | 2009-12-11 23:00:49 +0000 | [diff] [blame] | 41 | // ARMV7_HARDFLOAT: clang |
| 42 | // ARMV7_HARDFLOAT: "-cc1" |
Daniel Dunbar | 87667aa | 2009-12-08 19:49:51 +0000 | [diff] [blame] | 43 | // ARMV7_HARDFLOAT-NOT: "-msoft-float" |
| 44 | // ARMV7_HARDFLOAT: "-mfloat-abi" "hard" |
| 45 | // ARMV7_HARDFLOAT-NOT: "-msoft-float" |
| 46 | // ARMV7_HARDFLOAT: "-x" "c" |
Evgeniy Stepanov | 4add84f | 2012-04-25 08:35:56 +0000 | [diff] [blame] | 47 | |
| 48 | // RUN: %clang -target arm-linux -### -S %s 2> %t.log \ |
| 49 | // RUN: -march=armv5e |
| 50 | // RUN: FileCheck -check-prefix=ARMV5E %s < %t.log |
| 51 | // ARMV5E: clang |
| 52 | // ARMV5E: "-cc1" |
| 53 | // ARMV5E: "-target-cpu" "arm1022e" |
Hal Finkel | 02a8427 | 2012-06-11 22:35:19 +0000 | [diff] [blame] | 54 | |
Bob Wilson | afaa421 | 2012-06-12 20:22:45 +0000 | [diff] [blame] | 55 | // RUN: %clang -ccc-clang-archs powerpc64 \ |
| 56 | // RUN: -target powerpc64-unknown-linux-gnu -### -S %s 2> %t.log \ |
Hal Finkel | 02a8427 | 2012-06-11 22:35:19 +0000 | [diff] [blame] | 57 | // RUN: -mcpu=G5 |
| 58 | // RUN: FileCheck -check-prefix=PPCG5 %s < %t.log |
| 59 | // PPCG5: clang |
| 60 | // PPCG5: "-cc1" |
| 61 | // PPCG5: "-target-cpu" "g5" |
| 62 | |
Bob Wilson | afaa421 | 2012-06-12 20:22:45 +0000 | [diff] [blame] | 63 | // RUN: %clang -ccc-clang-archs powerpc64 \ |
| 64 | // RUN: -target powerpc64-unknown-linux-gnu -### -S %s 2> %t.log \ |
Hal Finkel | 02a8427 | 2012-06-11 22:35:19 +0000 | [diff] [blame] | 65 | // RUN: -mcpu=power7 |
| 66 | // RUN: FileCheck -check-prefix=PPCPWR7 %s < %t.log |
| 67 | // PPCPWR7: clang |
| 68 | // PPCPWR7: "-cc1" |
| 69 | // PPCPWR7: "-target-cpu" "pwr7" |
| 70 | |
Bob Wilson | afaa421 | 2012-06-12 20:22:45 +0000 | [diff] [blame] | 71 | // RUN: %clang -ccc-clang-archs powerpc64 \ |
| 72 | // RUN: -target powerpc64-unknown-linux-gnu -### -S %s 2> %t.log |
Hal Finkel | 02a8427 | 2012-06-11 22:35:19 +0000 | [diff] [blame] | 73 | // RUN: FileCheck -check-prefix=PPC64NS %s < %t.log |
| 74 | // PPC64NS: clang |
| 75 | // PPC64NS: "-cc1" |
| 76 | // PPC64NS: "-target-cpu" "ppc64" |