#[non_exhaustive]pub enum CallingConvention {
SystemV,
WasmBasicCAbi,
WindowsFastcall,
AppleAarch64,
}
Expand description
The calling convention, which specifies things like which registers are used for passing arguments, which registers are callee-saved, and so on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SystemV
“System V”, which is used on most Unix-like platfoms. Note that the specific conventions vary between hardware architectures; for example, x86-32’s “System V” is entirely different from x86-64’s “System V”.
WasmBasicCAbi
The WebAssembly C ABI. https://github.com/WebAssembly/tool-conventions/blob/master/BasicCABI.md
WindowsFastcall
“Windows Fastcall”, which is used on Windows. Note that like “System V”, this varies between hardware architectures. On x86-32 it describes what Windows documentation calls “fastcall”, and on x86-64 it describes what Windows documentation often just calls the Windows x64 calling convention (though the compiler still recognizes “fastcall” as an alias for it).
AppleAarch64
Apple Aarch64 platforms use their own variant of the common Aarch64 calling convention.
https://developer.apple.com/documentation/xcode/writing_arm64_code_for_apple_platforms
Trait Implementations§
source§impl Clone for CallingConvention
impl Clone for CallingConvention
source§fn clone(&self) -> CallingConvention
fn clone(&self) -> CallingConvention
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CallingConvention
impl Debug for CallingConvention
source§impl Hash for CallingConvention
impl Hash for CallingConvention
source§impl PartialEq<CallingConvention> for CallingConvention
impl PartialEq<CallingConvention> for CallingConvention
source§fn eq(&self, other: &CallingConvention) -> bool
fn eq(&self, other: &CallingConvention) -> bool
self
and other
values to be equal, and is used
by ==
.