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
//! Inline assembly, after checking.
//!
//! Design: `spec/13-gnu-compat.md` and `spec/11-asm-objects-debug.md`, which owns what a
//! constraint means. Nothing here looks inside a template.
//!
//! The shape is the one the parser produced, with the operands still in source order, because
//! the template refers to them by the position they were written in and renumbering them would
//! make `%1` name something the program did not write. What checking adds is the type of every
//! operand, the labels resolved to the ones the function declares, and one answer per operand
//! that the walk to the IR would otherwise have to work out for itself: whether the operand
//! travels as a value or as the address of an object.
//!
//! That last answer is here rather than in the walk because two passes need it and they have to
//! agree. The walk builds the address of a memory operand, and the scan that runs before it
//! decides which locals need a stack slot, so an operand the walk takes the address of has to be
//! an operand the scan already knew about. One field read twice is how they agree.
use AsmQuals;
use ;
use Span;
use crateExprId;
use crateStrId;
/// An assembly statement, in the side table.
pub type AsmId = ;
/// The table of references to string literals, which is what a clobber list is a run of.
;
/// A run of string literals.
pub type StrList = ;
/// The table of references to labels, which is what an `asm goto` label list is a run of.
;
/// A run of labels.
pub type LabelList = ;
/// A run of operands.
pub type AsmOperandList = ;
/// One `asm` statement.
/// One `asm` written at file scope, outside any function.
///
/// Its own type rather than an [`Asm`] with empty lists, because the two are different things
/// under the same keyword. A statement's template refers to operands by number and is one
/// instruction of a function; a file-scope one has no operands to refer to, so `%` in it means
/// nothing in particular, and what it says is what the translation unit itself contains. Keeping
/// them apart is what lets the walk over the tree read the template as written rather than as a
/// format string with nothing filled into it.
/// One operand of an assembly statement.