@@ -10,12 +10,13 @@ through all of the compiler layers down to LLVM codegen. Throughout the various
10
10
11
11
- The template string, which is stored as an array of ` InlineAsmTemplatePiece ` . Each piece
12
12
represents either a literal or a placeholder for an operand (just like format strings).
13
- ``` rust
14
- pub enum InlineAsmTemplatePiece {
15
- String (String ),
16
- Placeholder { operand_idx : usize , modifier : Option <char >, span : Span },
17
- }
18
- ```
13
+
14
+ ``` rust
15
+ pub enum InlineAsmTemplatePiece {
16
+ String (String ),
17
+ Placeholder { operand_idx : usize , modifier : Option <char >, span : Span },
18
+ }
19
+ ```
19
20
20
21
- The list of operands to the ` asm! ` (` in ` , ` [late]out ` , ` in[late]out ` , ` sym ` , ` const ` ). These are
21
22
represented differently at each stage of lowering, but follow a common pattern:
@@ -34,21 +35,22 @@ or a `fn`.
34
35
- The options set at the end of the ` asm! ` macro. The only ones that are of particular interest to
35
36
rustc are ` NORETURN ` which makes ` asm! ` return ` ! ` instead of ` () ` , and ` RAW ` which disables format
36
37
string parsing. The remaining options are mostly passed through to LLVM with little processing.
37
- ``` rust
38
- bitflags :: bitflags! {
39
- pub struct InlineAsmOptions : u16 {
40
- const PURE = 1 << 0 ;
41
- const NOMEM = 1 << 1 ;
42
- const READONLY = 1 << 2 ;
43
- const PRESERVES_FLAGS = 1 << 3 ;
44
- const NORETURN = 1 << 4 ;
45
- const NOSTACK = 1 << 5 ;
46
- const ATT_SYNTAX = 1 << 6 ;
47
- const RAW = 1 << 7 ;
48
- const MAY_UNWIND = 1 << 8 ;
49
- }
50
- }
51
- ```
38
+
39
+ ``` rust
40
+ bitflags :: bitflags! {
41
+ pub struct InlineAsmOptions : u16 {
42
+ const PURE = 1 << 0 ;
43
+ const NOMEM = 1 << 1 ;
44
+ const READONLY = 1 << 2 ;
45
+ const PRESERVES_FLAGS = 1 << 3 ;
46
+ const NORETURN = 1 << 4 ;
47
+ const NOSTACK = 1 << 5 ;
48
+ const ATT_SYNTAX = 1 << 6 ;
49
+ const RAW = 1 << 7 ;
50
+ const MAY_UNWIND = 1 << 8 ;
51
+ }
52
+ }
53
+ ```
52
54
53
55
## AST
54
56
0 commit comments