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).
1357
1357
1358
1358
r[asm.naked-rules.reg-not-output]
1359
-
- Any callee-saved registers must have the same value upon exiting the asm block as they had on entry, otherwise behavior is undefined.
1359
+
- Any callee-saved registers must have the same value upon return as they had on entry, otherwise behavior is undefined.
1360
1360
- Caller-saved registes may be used freely, even if they are not used for the return value.
1361
1361
1362
1362
r[asm.naked-rules.unwind]
@@ -1365,6 +1365,7 @@ r[asm.naked-rules.unwind]
1365
1365
1366
1366
r[asm.naked-rules.noreturn]
1367
1367
- Behavior is undefined if execution falls through to the end of the asm block.
1368
+
- the assembly code is expected to contain a return instruction or to diverge
1368
1369
1369
1370
r[asm.naked-rules.mem-same-as-ffi]
1370
1371
- 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.
1378
1379
- 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.
1379
1380
1380
-
r[asm.naked-rules.not-exactly-once]
1381
-
- You cannot assume that an `naked_asm!` block will appear exactly once in the output binary.
1382
-
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