File: as-options.s

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (154 lines) | stat: -rw-r--r-- 6,968 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// PR21000: Test that -I is passed to both external and integrated assemblers.

// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
// RUN:   -Ifoo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
// RUN:   -I foo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
// RUN:   -Ifoo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
// RUN:   -I foo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// Other GNU targets

// RUN: %clang -target aarch64-linux-gnu -c -no-integrated-as %s \
// RUN:   -Ifoo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// RUN: %clang -target aarch64-linux-gnu -c -integrated-as %s \
// RUN:   -Ifoo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// RUN: %clang -target armv7-linux-gnueabihf -c -no-integrated-as %s \
// RUN:   -Ifoo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// RUN: %clang -target armv7-linux-gnueabihf -c -integrated-as %s \
// RUN:   -Ifoo_dir -### 2>&1 \
// RUN:   | FileCheck %s

// CHECK: "-I" "foo_dir"

// Test that assembler options don't cause warnings when there's no assembler
// stage.

// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
// RUN:   -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
// RUN:   -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s

// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s

// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN:   -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s

// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN:   -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s

// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN:   -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
// RUN:   -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s

// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s

// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN:   -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
// RUN:   -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s

// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN:   -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
// RUN:   -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s

// NOWARN-NOT: unused

// Test that unsupported arguments do not cause errors when -fno-integrated-as
// is set.
// RUN: %clang -Wa,-mno-warn-deprecated -fno-integrated-as %s -S 2>&1 \
// RUN:   | FileCheck --check-prefix=NOERROR --allow-empty %s
// NOERROR-NOT: error: unsupported argument '-mno-warn-deprecated' to option 'Wa,'

// -Wa flags shouldn't cause warnings without an assembler stage with
// -fno-integrated-as either.
// RUN: %clang -Wa,-mno-warn-deprecated -fno-integrated-as -x c++ %s -S 2>&1 \
// RUN:   -o /dev/null \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s

// But -m flags for the integrated assembler _should_ warn if the integrated
// assembler is not in use.
// RUN: %clang -mrelax-all -fintegrated-as -x c++ %s -S -o /dev/null 2>&1 \
// RUN:   | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mrelax-all -fno-integrated-as -x c++ %s -S -o /dev/null 2>&1 \
// RUN:   | FileCheck --check-prefix=WARN --allow-empty %s
// WARN: unused

// Test that -g is passed through to GAS.
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=DEBUG %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g0 -g %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=DEBUG %s
// DEBUG: "-g" "-gdwarf-5"
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g -g0 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=NODEBUG %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 -g0 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=NODEBUG %s
// NODEBUG-NOT: "-g"
// NODEBUG-NOT: "-gdwarf-

// Test that -gdwarf-* is passed through to GAS.
// TODO: test without -g
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=GDWARF5 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-4 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=GDWARF4 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-3 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=GDWARF3 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-2 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=GDWARF2 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=GDWARF5 %s

// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -gdwarf-5 %s -### 2>&1 | \
// RUN:   FileCheck --check-prefix=GDWARF5 %s
// RUN: %clang --target=aarch64-linux-gnu -fno-integrated-as -g \
// RUN:   -fdebug-default-version=2 %s -### 2>&1 | FileCheck --check-prefix=GDWARF2 %s

// GDWARF5: "-gdwarf-5"
// GDWARF4: "-gdwarf-4"
// GDWARF3: "-gdwarf-3"
// GDWARF2: "-gdwarf-2"