saulecabrera opened PR #10888 from saulecabrera:winch-aarch64-constant-pool to bytecodealliance:main:
This commit is the first step toward simplifying constant handling,
particularly for the aarch64 backend.The main highlights in this patch are:
Introduction of
ConstantPoolimplemenetation on top of Cranlift
primitives. The implemettaion is identical to the existing for x64,
however, it's abstracted so that it can be easily consumed from any
existing backend.Usage of the constant pool from aarch64, which simplifies the
loading of constants, particularly floating point constants.The main motivation behind this change is to _eventually_ detach the
implicit usage of the scatch register from constant loading as much as
possible, reducing the possibility of subtle bugs (like the one
described in https://github.com/bytecodealliance/wasmtime/pull/10829).Note that I have a work-in-progress branch from where all these
changes are cherry picked from, to make everything easier to review.A side effect of this change, is the improvement to the code
generation involving floating point constants. Prior to this change,
multiple moves were involved, with this patch, at most 1 move is
required and at worst one load is required.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
saulecabrera requested abrown for a review on PR #10888.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #10888.
saulecabrera requested alexcrichton for a review on PR #10888.
saulecabrera requested wasmtime-core-reviewers for a review on PR #10888.
Last updated: Dec 06 2025 at 06:05 UTC