winch(x64): Improve ABI support in trampolines (#6204)

This commit improves ABI support in Winch's trampolines mainly by:

* Adding support for the `fastcall` calling convention.
* By storing/restoring callee-saved registers.

One of the explicit goals of this change is to make tests available in the x86_64 target
as a whole and remove the need exclude the windows target.

This commit also introduces a `CallingConvention` enum, to better
reflect the subset of calling conventions that are supported by Winch.
This commit is contained in:
Saúl Cabrera
2023-04-14 17:13:23 -04:00
committed by GitHub
parent 9e1ff9726c
commit 9dd0b59c2a
11 changed files with 340 additions and 89 deletions

View File

@@ -34,8 +34,8 @@ mod traps;
mod wait_notify;
mod wasi_testsuite;
mod wast;
// Currently Winch is only supported in x86_64 unix platforms.
#[cfg(all(target_arch = "x86_64", target_family = "unix"))]
// Currently Winch is only supported in x86_64.
#[cfg(all(target_arch = "x86_64"))]
mod winch;
/// A helper to compile a module in a new store with reference types enabled.