summaryrefslogtreecommitdiffstats
path: root/src/test/ui/asm/x86_64/bad-reg.stderr
blob: 82b7ebd0fb07abde2f0920028342b581344ad95d (plain)
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
error: invalid register class `foo`: unknown register class
  --> $DIR/bad-reg.rs:14:20
   |
LL |         asm!("{}", in(foo) foo);
   |                    ^^^^^^^^^^^

error: invalid register `foo`: unknown register
  --> $DIR/bad-reg.rs:16:18
   |
LL |         asm!("", in("foo") foo);
   |                  ^^^^^^^^^^^^^

error: invalid asm template modifier for this register class
  --> $DIR/bad-reg.rs:18:15
   |
LL |         asm!("{:z}", in(reg) foo);
   |               ^^^^   ----------- argument
   |               |
   |               template modifier
   |
   = note: the `reg` register class supports the following template modifiers: `l`, `x`, `e`, `r`

error: invalid asm template modifier for this register class
  --> $DIR/bad-reg.rs:20:15
   |
LL |         asm!("{:r}", in(xmm_reg) foo);
   |               ^^^^   --------------- argument
   |               |
   |               template modifier
   |
   = note: the `xmm_reg` register class supports the following template modifiers: `x`, `y`, `z`

error: asm template modifiers are not allowed for `const` arguments
  --> $DIR/bad-reg.rs:22:15
   |
LL |         asm!("{:a}", const 0);
   |               ^^^^   ------- argument
   |               |
   |               template modifier

error: asm template modifiers are not allowed for `sym` arguments
  --> $DIR/bad-reg.rs:24:15
   |
LL |         asm!("{:a}", sym main);
   |               ^^^^   -------- argument
   |               |
   |               template modifier

error: invalid register `ebp`: the frame pointer cannot be used as an operand for inline asm
  --> $DIR/bad-reg.rs:26:18
   |
LL |         asm!("", in("ebp") foo);
   |                  ^^^^^^^^^^^^^

error: invalid register `rsp`: the stack pointer cannot be used as an operand for inline asm
  --> $DIR/bad-reg.rs:28:18
   |
LL |         asm!("", in("rsp") foo);
   |                  ^^^^^^^^^^^^^

error: invalid register `ip`: the instruction pointer cannot be used as an operand for inline asm
  --> $DIR/bad-reg.rs:30:18
   |
LL |         asm!("", in("ip") foo);
   |                  ^^^^^^^^^^^^

error: register class `x87_reg` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:33:18
   |
LL |         asm!("", in("st(2)") foo);
   |                  ^^^^^^^^^^^^^^^

error: register class `mmx_reg` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:36:18
   |
LL |         asm!("", in("mm0") foo);
   |                  ^^^^^^^^^^^^^

error: register class `kreg0` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:39:18
   |
LL |         asm!("", in("k0") foo);
   |                  ^^^^^^^^^^^^

error: register class `x87_reg` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:44:20
   |
LL |         asm!("{}", in(x87_reg) foo);
   |                    ^^^^^^^^^^^^^^^

error: register class `mmx_reg` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:47:20
   |
LL |         asm!("{}", in(mmx_reg) foo);
   |                    ^^^^^^^^^^^^^^^

error: register class `x87_reg` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:50:20
   |
LL |         asm!("{}", out(x87_reg) _);
   |                    ^^^^^^^^^^^^^^

error: register class `mmx_reg` can only be used as a clobber, not as an input or output
  --> $DIR/bad-reg.rs:52:20
   |
LL |         asm!("{}", out(mmx_reg) _);
   |                    ^^^^^^^^^^^^^^

error: register `al` conflicts with register `ax`
  --> $DIR/bad-reg.rs:58:33
   |
LL |         asm!("", in("eax") foo, in("al") bar);
   |                  -------------  ^^^^^^^^^^^^ register `al`
   |                  |
   |                  register `ax`

error: register `ax` conflicts with register `ax`
  --> $DIR/bad-reg.rs:61:33
   |
LL |         asm!("", in("rax") foo, out("rax") bar);
   |                  -------------  ^^^^^^^^^^^^^^ register `ax`
   |                  |
   |                  register `ax`
   |
help: use `lateout` instead of `out` to avoid conflict
  --> $DIR/bad-reg.rs:61:18
   |
LL |         asm!("", in("rax") foo, out("rax") bar);
   |                  ^^^^^^^^^^^^^

error: register `ymm0` conflicts with register `xmm0`
  --> $DIR/bad-reg.rs:66:34
   |
LL |         asm!("", in("xmm0") foo, in("ymm0") bar);
   |                  --------------  ^^^^^^^^^^^^^^ register `ymm0`
   |                  |
   |                  register `xmm0`

error: register `ymm0` conflicts with register `xmm0`
  --> $DIR/bad-reg.rs:68:34
   |
LL |         asm!("", in("xmm0") foo, out("ymm0") bar);
   |                  --------------  ^^^^^^^^^^^^^^^ register `ymm0`
   |                  |
   |                  register `xmm0`
   |
help: use `lateout` instead of `out` to avoid conflict
  --> $DIR/bad-reg.rs:68:18
   |
LL |         asm!("", in("xmm0") foo, out("ymm0") bar);
   |                  ^^^^^^^^^^^^^^

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:33:30
   |
LL |         asm!("", in("st(2)") foo);
   |                              ^^^
   |
   = note: register class `x87_reg` supports these types: 

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:36:28
   |
LL |         asm!("", in("mm0") foo);
   |                            ^^^
   |
   = note: register class `mmx_reg` supports these types: 

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:39:27
   |
LL |         asm!("", in("k0") foo);
   |                           ^^^
   |
   = note: register class `kreg0` supports these types: 

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:44:32
   |
LL |         asm!("{}", in(x87_reg) foo);
   |                                ^^^
   |
   = note: register class `x87_reg` supports these types: 

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:47:32
   |
LL |         asm!("{}", in(mmx_reg) foo);
   |                                ^^^
   |
   = note: register class `mmx_reg` supports these types: 

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:58:42
   |
LL |         asm!("", in("eax") foo, in("al") bar);
   |                                          ^^^
   |
   = note: register class `reg_byte` supports these types: i8

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:63:27
   |
LL |         asm!("", in("al") foo, lateout("al") bar);
   |                           ^^^
   |
   = note: register class `reg_byte` supports these types: i8

error: type `i32` cannot be used with this register class
  --> $DIR/bad-reg.rs:63:46
   |
LL |         asm!("", in("al") foo, lateout("al") bar);
   |                                              ^^^
   |
   = note: register class `reg_byte` supports these types: i8

error: aborting due to 28 previous errors