blob: 76196da9fc3d6eaf34895e5eec458349a0368c7b [file] [log] [blame]
Sebastian Pop9ec60df2012-01-20 22:01:23 +00001// RUN: %clang -target i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep '"-triple" "i386-unknown-unknown"' %t.log
3// RUN: grep '"-S"' %t.log
4// RUN: grep '"-disable-free"' %t.log
Daniel Dunbarf219e7c2009-11-29 07:18:39 +00005// RUN: grep '"-mrelocation-model" "static"' %t.log
6// RUN: grep '"-mdisable-fp-elim"' %t.log
7// RUN: grep '"-munwind-tables"' %t.log
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00008// RUN: grep '"-Os"' %t.log
9// RUN: grep '"-o" .*clang-translation.*' %t.log
Daniel Dunbarf219e7c2009-11-29 07:18:39 +000010// RUN: grep '"-masm-verbose"' %t.log
Daniel Dunbarba8d8612009-12-03 18:42:11 +000011// RUN: grep '"-fvisibility" "hidden"' %t.log
Sebastian Pop9ec60df2012-01-20 22:01:23 +000012// RUN: %clang -target i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log
Daniel Dunbar38b48af2009-12-18 06:30:12 +000013// RUN: grep '"-target-cpu" "yonah"' %t.log
Sebastian Pop9ec60df2012-01-20 22:01:23 +000014// RUN: %clang -target x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log
Daniel Dunbar38b48af2009-12-18 06:30:12 +000015// RUN: grep '"-target-cpu" "core2"' %t.log
Daniel Dunbar87667aa2009-12-08 19:49:51 +000016
Sebastian Pop9ec60df2012-01-20 22:01:23 +000017// RUN: %clang -target x86_64-apple-darwin10 -### -S %s 2> %t.log \
Daniel Dunbar87667aa2009-12-08 19:49:51 +000018// RUN: -arch armv7
19// RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s < %t.log
Daniel Dunbar8ff5b282009-12-11 23:00:49 +000020// ARMV7_DEFAULT: clang
21// ARMV7_DEFAULT: "-cc1"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000022// ARMV7_DEFAULT-NOT: "-msoft-float"
23// ARMV7_DEFAULT: "-mfloat-abi" "soft"
24// ARMV7_DEFAULT-NOT: "-msoft-float"
25// ARMV7_DEFAULT: "-x" "c"
26
Sebastian Pop9ec60df2012-01-20 22:01:23 +000027// RUN: %clang -target x86_64-apple-darwin10 -### -S %s 2> %t.log \
Daniel Dunbar87667aa2009-12-08 19:49:51 +000028// RUN: -arch armv7 -msoft-float
29// RUN: FileCheck -check-prefix=ARMV7_SOFTFLOAT %s < %t.log
Daniel Dunbar8ff5b282009-12-11 23:00:49 +000030// ARMV7_SOFTFLOAT: clang
31// ARMV7_SOFTFLOAT: "-cc1"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000032// ARMV7_SOFTFLOAT: "-msoft-float"
33// ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
Daniel Dunbar7187fac2011-03-17 00:07:34 +000034// ARMV7_SOFTFLOAT: "-target-feature"
35// ARMV7_SOFTFLOAT: "-neon"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000036// ARMV7_SOFTFLOAT: "-x" "c"
37
Sebastian Pop9ec60df2012-01-20 22:01:23 +000038// RUN: %clang -target x86_64-apple-darwin10 -### -S %s 2> %t.log \
Daniel Dunbar87667aa2009-12-08 19:49:51 +000039// RUN: -arch armv7 -mhard-float
40// RUN: FileCheck -check-prefix=ARMV7_HARDFLOAT %s < %t.log
Daniel Dunbar8ff5b282009-12-11 23:00:49 +000041// ARMV7_HARDFLOAT: clang
42// ARMV7_HARDFLOAT: "-cc1"
Daniel Dunbar87667aa2009-12-08 19:49:51 +000043// ARMV7_HARDFLOAT-NOT: "-msoft-float"
44// ARMV7_HARDFLOAT: "-mfloat-abi" "hard"
45// ARMV7_HARDFLOAT-NOT: "-msoft-float"
46// ARMV7_HARDFLOAT: "-x" "c"
Evgeniy Stepanov4add84f2012-04-25 08:35:56 +000047
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 Finkel02a84272012-06-11 22:35:19 +000054
Bob Wilsonafaa4212012-06-12 20:22:45 +000055// RUN: %clang -ccc-clang-archs powerpc64 \
56// RUN: -target powerpc64-unknown-linux-gnu -### -S %s 2> %t.log \
Hal Finkel02a84272012-06-11 22:35:19 +000057// 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 Wilsonafaa4212012-06-12 20:22:45 +000063// RUN: %clang -ccc-clang-archs powerpc64 \
64// RUN: -target powerpc64-unknown-linux-gnu -### -S %s 2> %t.log \
Hal Finkel02a84272012-06-11 22:35:19 +000065// 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 Wilsonafaa4212012-06-12 20:22:45 +000071// RUN: %clang -ccc-clang-archs powerpc64 \
72// RUN: -target powerpc64-unknown-linux-gnu -### -S %s 2> %t.log
Hal Finkel02a84272012-06-11 22:35:19 +000073// RUN: FileCheck -check-prefix=PPC64NS %s < %t.log
74// PPC64NS: clang
75// PPC64NS: "-cc1"
76// PPC64NS: "-target-cpu" "ppc64"