Location: https://doc.rust-lang.org/nightly/reference/inline-assembly.html#options
i.e. is the following UB:
pub fn foo() {
unsafe { core::arch::asm!("push rax", "pop rax", options(nomem)) }
}
This code obviously does write to memory, but the reference only talks about global variables for nomem, which make me think this probably fine? It would be nice to clarify whether nomem inline assembly is allowed to access to stack at all.
Location: https://doc.rust-lang.org/nightly/reference/inline-assembly.html#options
i.e. is the following UB:
This code obviously does write to memory, but the reference only talks about global variables for
nomem, which make me think this probably fine? It would be nice to clarify whethernomeminline assembly is allowed to access to stack at all.