Skip to content

Commit c8aa67d

Browse files
nbdd0121Darksonn
andauthored
Apply editorial suggestions from code review
Co-authored-by: Alice Ryhl <[email protected]>
1 parent 4314463 commit c8aa67d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/inline-assembly.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ r[asm.operand-type.supported-operands.label]
359359
- The address of the block is substituted into the asm template string. The assembly code may jump to the substituted address.
360360
- After execution of the block, the `asm!` expression returns.
361361
- The type of the block must be unit or `!` (never).
362-
- 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.
362+
- The block starts a new safety context: unsafe operations within the `label` block must be wrapped in an inner `unsafe` block, even though the entire `asm!` statement is already wrapped in `unsafe`.
363363

364364
```rust
365365
# #[cfg(target_arch = "x86_64")]
@@ -1331,7 +1331,7 @@ r[asm.rules.arm64ec]
13311331

13321332
r[asm.rules.only-on-exit]
13331333
- The requirement of restoring the stack pointer and non-output registers to their original value only applies when exiting the assembly code.
1334-
- This means that assembly code that never return (even if not marked `noreturn`) don't need to preserve these registers.
1334+
- This means that assembly code that never returns (even if not marked `noreturn`) doesn't need to preserve these registers.
13351335
- When returning to a different `asm!` block than you entered (e.g. for context switching), these registers must contain the value they had upon entering the `asm!` block that you are *exiting*.
13361336
- You cannot exit an `asm!` block that has not been entered.
13371337
Neither can you exit an `asm!` block that has already been exited (without first entering it again).

0 commit comments

Comments
 (0)