Skip to content

Commit eea601a

Browse files
committedApr 26, 2025·
Clarify interaction of asm-goto with IBT
1 parent 5ba6736 commit eea601a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/inline-assembly.md

+1
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ assert_eq!(y, [3, 2, 0, 1]);
371371
r[asm.operand-type.supported-operands.label]
372372
* `label <block>`
373373
- The address of the block is substituted into the asm template string. The assembly code may jump to the substituted address.
374+
- 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.
374375
- After execution of the block, the `asm!` expression returns.
375376
- The type of the block must be unit or `!` (never).
376377
- 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`.

0 commit comments

Comments
 (0)
Please sign in to comment.