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:
Benjamin Bouvier
2021-06-01 11:29:52 +02:00
parent aa2c0cd0ec
commit 51edea9e57
6 changed files with 25 additions and 11 deletions

View File

@@ -183,7 +183,7 @@ impl ABIMachineSpec for AArch64MachineDeps {
args_or_rets: ArgsOrRets,
add_ret_area_ptr: bool,
) -> CodegenResult<(Vec<ABIArg>, i64, Option<usize>)> {
let is_apple_cc = call_conv == isa::CallConv::AppleAarch64;
let is_apple_cc = call_conv.extends_apple_aarch64();
let is_baldrdash = call_conv.extends_baldrdash();
let has_baldrdash_tls = call_conv == isa::CallConv::Baldrdash2020;