Skip to content

Commit 4ca5eab

Browse files
committed
Clarify interaction of asm-goto with IBT
1 parent 75a60d3 commit 4ca5eab

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
@@ -357,6 +357,7 @@ assert_eq!(y, [3, 2, 0, 1]);
357357
r[asm.operand-type.supported-operands.label]
358358
* `label <block>`
359359
- The address of the block is substituted into the asm template string. The assembly code may jump to the substituted address.
360+
- 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.
360361
- After execution of the block, the `asm!` expression returns.
361362
- The type of the block must be unit or `!` (never).
362363
- 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)