Skip to content

Commit d95dbe2

Browse files
committed
Make some editorial adjustments
1 parent 20a8be8 commit d95dbe2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/inline-assembly.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ r[asm.operand-type.supported-operands.sym]
182182

183183
r[asm.operand-type.supported-operands.label]
184184
* `label <block>`
185-
- The address of the block is substituted into the asm template string. The assembly block may jump to the substituted addresses.
185+
- The address of the block is substituted into the asm template string. The assembly block may jump to the substituted address.
186186
- After execution of the block, the `asm!` expression returns.
187187
- The type of the block must be unit or `!` (never).
188-
- The block starts new safety context; despite the outer `unsafe` needed for `asm!`, you need an extra `unsafe` to perform unsafe operations inside the block.
188+
- The block starts a new safety context; despite the outer `unsafe` block needed for `asm!`, unsafe operations within the `label` block must be wrapped in an inner `unsafe` block.
189189

190190
r[asm.operand-type.left-to-right]
191191
Operand expressions are evaluated from left to right, just like function call arguments.
@@ -560,8 +560,8 @@ r[asm.options.supported-options.noreturn]
560560
- `noreturn`: The `asm!` block never returns, and its return type is defined as `!` (never).
561561
Behavior is undefined if execution falls through past the end of the asm code.
562562
A `noreturn` asm block behaves just like a function which doesn't return; notably, local variables in scope are not dropped before it is invoked.
563-
- When labels are present, `noreturn` means the execution of the `asm!` block never falls through; the asm block may only exit by jumping to one of the specified blocks.
564-
The entire `asm!` block will have unit type in this case, unless all label blocks diverge, in which case the return type is `!`.
563+
- When any `label` blocks are present, `noreturn` means the execution of the `asm!` block never falls through; the asm block may only exit by jumping to one of the specified blocks.
564+
The entire `asm!` block will have unit type in this case, unless all `label` blocks diverge, in which case the return type is `!`.
565565

566566
r[asm.options.supported-options.nostack]
567567
- `nostack`: The `asm!` block does not push data to the stack, or write to the stack red-zone (if supported by the target).
@@ -588,7 +588,7 @@ r[asm.options.checks.noreturn]
588588
- It is a compile-time error to specify `noreturn` on an asm block with outputs and without labels.
589589

590590
r[asm.options.checks.label-with-outputs]
591-
- It is a compile-time error to specify label on an asm block with outputs.
591+
- It is a compile-time error to have any `label` blocks in an asm block with outputs.
592592

593593
r[asm.options.global_asm-restriction]
594594
`global_asm!` only supports the `att_syntax` and `raw` options.

0 commit comments

Comments
 (0)