Skip to content

Commit 97a6173

Browse files
traviscrossnbdd0121
authored andcommitted
Make some editorial adjustments
1 parent 0d28a09 commit 97a6173

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/inline-assembly.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ r[asm.operand-type.supported-operands.sym]
178178

179179
r[asm.operand-type.supported-operands.label]
180180
* `label <block>`
181-
- The address of the block is substituted into the asm template string. The assembly block may jump to the substituted addresses.
181+
- The address of the block is substituted into the asm template string. The assembly block may jump to the substituted address.
182182
- After execution of the block, the `asm!` expression returns.
183183
- The type of the block must be unit or `!` (never).
184-
- 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.
184+
- 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.
185185

186186
r[asm.operand-type.left-to-right]
187187
Operand expressions are evaluated from left to right, just like function call arguments.
@@ -553,8 +553,8 @@ r[asm.options.supported-options.noreturn]
553553
- `noreturn`: The `asm!` block never returns, and its return type is defined as `!` (never).
554554
Behavior is undefined if execution falls through past the end of the asm code.
555555
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.
556-
- 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.
557-
The entire `asm!` block will have unit type in this case, unless all label blocks diverge, in which case the return type is `!`.
556+
- 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.
557+
The entire `asm!` block will have unit type in this case, unless all `label` blocks diverge, in which case the return type is `!`.
558558

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

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

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

0 commit comments

Comments
 (0)