cranelift: introduce a new WasmtimeAppleAarch64 calling convention
The previous choice to use the WasmtimeSystemV calling convention for apple-aarch64 devices was incorrect: padding of arguments was incorrectly computed. So we have to use some flavor of the apple-aarch64 ABI there. Since we want to support the wasmtime custom convention for multiple returns on apple-aarch64 too, a new custom Wasmtime calling convention was introduced to support this.
This commit is contained in:
@@ -468,9 +468,8 @@ pub fn blank_sig(isa: &dyn TargetIsa, call_conv: CallConv) -> ir::Signature {
|
||||
|
||||
pub fn wasmtime_call_conv(isa: &dyn TargetIsa) -> CallConv {
|
||||
match isa.triple().default_calling_convention() {
|
||||
Ok(CallingConvention::SystemV) | Ok(CallingConvention::AppleAarch64) | Err(()) => {
|
||||
CallConv::WasmtimeSystemV
|
||||
}
|
||||
Ok(CallingConvention::AppleAarch64) => CallConv::WasmtimeAppleAarch64,
|
||||
Ok(CallingConvention::SystemV) | Err(()) => CallConv::WasmtimeSystemV,
|
||||
Ok(CallingConvention::WindowsFastcall) => CallConv::WasmtimeFastcall,
|
||||
Ok(unimp) => unimplemented!("calling convention: {:?}", unimp),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user