ARM64 backend, part 9 / 11: wasmtime support.

This commit adds a few odds and ends required to build wasmtime on ARM64
with the new backend. In particular, it adds:

- Support for the `Arm64Call` relocation type.
- Support for fetching the trap PC when a signal is received.
- A hook for `SIGTRAP`, which is sent by the `brk` opcode (in contrast to
  x86's `SIGILL`).

With the patch sequence up to and including this patch applied,
`wasmtime` can now compile and successfully execute code on arm64. Not
all tests pass yet, but basic Wasm/WASI tests work correctly.
This commit is contained in:
Chris Fallin
2020-04-09 13:54:29 -07:00
parent 60990aeaae
commit bab0c79c31
4 changed files with 45 additions and 9 deletions

View File

@@ -122,7 +122,7 @@ mod tests {
.downcast::<Trap>()?;
assert!(
trap.message()
.starts_with("wasm trap: out of bounds memory access"),
.starts_with("wasm trap: out of bounds"),
"bad trap message: {:?}",
trap.message()
);
@@ -149,7 +149,7 @@ mod tests {
.downcast::<Trap>()?;
assert!(trap
.message()
.starts_with("wasm trap: out of bounds memory access"));
.starts_with("wasm trap: out of bounds"));
}
Ok(())
}