Skip to content

Commit f92f75f

Browse files
committed
reintroduce a section on unwinding out of naked_asm!
1 parent 0677e1e commit f92f75f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/inline-assembly.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ r[asm.rules.reg-not-output]
12201220
Code should not rely on this however since it depends on the results of register allocation.
12211221

12221222
r[asm.rules.unwind]
1223-
- Behavior is undefined if execution unwinds out of an asm block.
1223+
- Behavior is undefined if execution unwinds out of an `asm!` block.
12241224
- This also applies if the assembly code calls a function which then unwinds.
12251225

12261226
r[asm.rules.mem-same-as-ffi]
@@ -1359,6 +1359,10 @@ r[asm.naked-rules.reg-not-output]
13591359
- Any callee-saved registers must have the same value upon return as they had on entry, otherwise behavior is undefined.
13601360
- Caller-saved registes may be used freely, even if they are not used for the return value.
13611361

1362+
r[asm.rules.unwind]
1363+
- Unwinding out of a `naked_asm!` block is allowed.
1364+
- For correct behavior, the appropriate assembler directives that emit unwinding metadata must be used.
1365+
13621366
r[asm.naked-rules.noreturn]
13631367
- Behavior is undefined if execution falls through to the end of the `naked_asm!` block.
13641368
- the assembly code is expected to contain a return instruction or to diverge

0 commit comments

Comments
 (0)