Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Clarify interaction of asm-goto with IBT
  • Loading branch information
nbdd0121 committed Apr 26, 2025
commit eea601a96578f21f1e2fdc8ddfa41eeaeb7d522f
1 change: 1 addition & 0 deletions src/inline-assembly.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ assert_eq!(y, [3, 2, 0, 1]);
r[asm.operand-type.supported-operands.label]
* `label <block>`
- The address of the block is substituted into the asm template string. The assembly code may jump to the substituted address.
- For targets that distinguish between direct jumps and indirect jumps (e.g. x86-64 with `cf-protection` enabled), the assembly code must not jump to the substituted address indirectly.
- After execution of the block, the `asm!` expression returns.
- The type of the block must be unit or `!` (never).
- 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!` expression is already wrapped in `unsafe`.
Expand Down