You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- A mangled symbol name referring to the item is substituted into the asm template string.
175
175
- The substituted string does not include any modifiers (e.g. GOT, PLT, relocations, etc).
176
176
-`<path>` is allowed to point to a `#[thread_local]` static, in which case the asm code can combine the symbol with relocations (e.g. `@plt`, `@TPOFF`) to read from thread-local data.
177
+
*`const <expr>`
178
+
-`<expr>` must be an integer constant expression. This expression follows the same rules as inline `const` blocks.
179
+
- The type of the expression may be any integer type, but defaults to `i32` just like integer literals.
180
+
- The value of the expression is formatted as a string and substituted directly into the asm template string.
177
181
178
182
r[asm.operand-type.left-to-right]
179
183
Operand expressions are evaluated from left to right, just like function call arguments.
180
184
After the `asm!` has executed, outputs are written to in left to right order.
181
185
This is significant if two outputs point to the same place: that place will contain the value of the rightmost output.
182
186
183
187
r[asm.operand-type.global_asm-restriction]
184
-
Since `global_asm!` exists outside a function, it can only use `sym` operands.
188
+
Since `global_asm!` exists outside a function, it can only use `sym`and `const`operands.
0 commit comments