You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notably it is not the same as an LLVM `undef` which can have a different value every time you read it (since such a concept does not exist in assembly code).
1388
1388
1389
1389
r[asm.naked-rules.reg-not-output]
1390
-
- Any callee-saved registers must have the same value upon exiting the asm block as they had on entry, otherwise behavior is undefined.
1390
+
- Any callee-saved registers must have the same value upon return as they had on entry, otherwise behavior is undefined.
1391
1391
- Caller-saved registes may be used freely, even if they are not used for the return value.
1392
1392
1393
1393
r[asm.naked-rules.unwind]
@@ -1396,6 +1396,7 @@ r[asm.naked-rules.unwind]
1396
1396
1397
1397
r[asm.naked-rules.noreturn]
1398
1398
- Behavior is undefined if execution falls through to the end of the asm block.
1399
+
- the assembly code is expected to contain a return instruction or to diverge
1399
1400
1400
1401
r[asm.naked-rules.mem-same-as-ffi]
1401
1402
- The set of memory locations that assembly code is allowed to read and write are the same as those allowed for an FFI function.
- Runtime code patching is allowed, via target-specific mechanisms.
1409
1410
- However there is no guarantee that each `naked_asm!` directly corresponds to a single instance of instructions in the object file: the compiler is free to duplicate or deduplicate `naked_asm!` blocks.
1410
1411
1411
-
r[asm.naked-rules.not-exactly-once]
1412
-
- You cannot assume that an `naked_asm!` block will appear exactly once in the output binary.
1413
-
The compiler is allowed to instantiate multiple copies of the `naked_asm!` block, for example when the function containing it is inlined in multiple places.
0 commit comments