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

@@ -26,3 +26,12 @@ void* GetPcFromUContext(ucontext_t *cx) {
return (void*) cx->uc_mcontext->__ss.__rip;
}
#endif
#if defined(__linux__) && defined(__aarch64__)
#include <sys/ucontext.h>
void* GetPcFromUContext(ucontext_t *cx) {
return (void*) cx->uc_mcontext.pc;
}
#endif // __linux__ && __aarch64__