ferros
ferros copied to clipboard
calling convention tests
We learned in debugging for #28, that without extern "C"
, Rust does not abide the aarch32 calling convention but instead, puts the parameters on the stack and a pointer to them in r0
. With that in mind, consider one of the subtleties of aarch64's calling convention: If a "composite type" is greater or equal to 16 bytes (2 words) in size, then it shall go into the stack and a pointer to it into x0
, otherwise, it can go into x0
and x1
. Without extern "C"
, does Rust follow these rules? Or does it always do the pointer-into-the-stack method?
Without extern "C", does Rust follow these rules? Or does it always do the pointer-into-the-stack method?
Whatever it happens to do, it's intentionally undefined, so we can't rely on it.