alexcrichton opened PR #11589 from alexcrichton:pulley-floats-caller-saved to bytecodealliance:main:
This commit updates the ABI used by Pulley to consider all float register as caller-saved instead of the previous classification which was a split half/half. This change means that when exceptions are used, for example, only the upper X registers need to be saved instead of the upper F registers as well. This mirrors the x64 ABI for example which clobbers all float registers on SystemV variants.
The motivation for this commit is to shrink the generated bytecode for exception-using functions. Clobbering all X registers has special support in the
push_frame_saveandpop_frame_restoreopcodes where the registers to save are a bitmask. With floats a separate instruction-per-register is needed. While it's possible to add a macro opcode to handle floats as well it was easier to update the ABI to match x64. Basically I figure that if the ABI is good enough for x64 it's probably fine for Pulley which already doesn't have great float performance (all float ops are "extended opcodes").<!--
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
-->
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11589.
alexcrichton requested fitzgen for a review on PR #11589.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11589.
alexcrichton requested cfallin for a review on PR #11589.
cfallin submitted PR review:
Good idea! Nice to see the golden outputs get so much smaller...
cfallin merged PR #11589.
Last updated: Jan 09 2026 at 13:15 UTC