Stream: git-wasmtime

Topic: wasmtime / PR #7584 cranelift-jit: implement GOT relocati...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 16:23):

Mrmaxmeier opened PR #7584 from Mrmaxmeier:aarch64-got-relocs to bytecodealliance:main:

This is a prerequisite for #2735, but doesn't implement the PLT entries yet.
(I'm using hot function replace, which happens in the GOT but doesn't strictly require the PLT.)

The instruction encoding for adrp is kind of complicated, but re-using existing lowering infrastructure doesn't work well since it's not designed to do partial updates. Xref: #5550, which introduced these relocation types.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 16:23):

Mrmaxmeier requested elliottt for a review on PR #7584.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 16:23):

Mrmaxmeier requested wasmtime-compiler-reviewers for a review on PR #7584.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 18:00):

elliottt submitted PR review:

Happy to approve after the offsets are removed, thank you!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 18:00):

elliottt submitted PR review:

Happy to approve after the offsets are removed, thank you!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 18:00):

elliottt created PR review comment:

We only emit Aarch64AdrGotPage21 relocations with an addend of 0. Would you mind removing the offset, and instead asserting that it's 0?

Additionally, to fully implement the operation Page(G(GDAT(S+A)))-Page(P) we would need to modify the function get_got_entry that's passed in, as we would need to make the offset calculation before looking up in the GOT. Asserting that the addend is zero means that we can avoid that refactoring.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 18:00):

elliottt created PR review comment:

We only emit Aarch64Ld64GotLo12Nc relocations with an addend of 0. Would you mind removing the offset, and instead asserting that it's 0?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 18:59):

Mrmaxmeier updated PR #7584.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 19:06):

Mrmaxmeier updated PR #7584.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 19:07):

Mrmaxmeier submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 19:07):

Mrmaxmeier created PR review comment:

Good catch! :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 20:30):

elliottt submitted PR review:

Thank you!

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 20:57):

elliottt merged PR #7584.


Last updated: Oct 23 2024 at 20:03 UTC