iximeow opened Issue #1498:
In
isa/x86/abi.rswe have to save callee-preserved FPRs for some calling conventions. We save these to the stack and reload them before exiting, but at the moment the Cranelift IR operationsstack_loadandstack_storeare not directly encodable. In other parts of a function,stack_loadandstack_storewould be legalized and then optimized into the assembly we'd like (movdqa [rsp + offset], xmm*), but prologue/epilogue addition happen after both legalization and register allocation.When
stack_loadandstack_storecan be directly encoded, we can switch to those, remove an explicitstack_address, and simplify x86 callee-preserved FPR machinery.For more, see this comment and this comment.
iximeow labeled Issue #1498:
In
isa/x86/abi.rswe have to save callee-preserved FPRs for some calling conventions. We save these to the stack and reload them before exiting, but at the moment the Cranelift IR operationsstack_loadandstack_storeare not directly encodable. In other parts of a function,stack_loadandstack_storewould be legalized and then optimized into the assembly we'd like (movdqa [rsp + offset], xmm*), but prologue/epilogue addition happen after both legalization and register allocation.When
stack_loadandstack_storecan be directly encoded, we can switch to those, remove an explicitstack_address, and simplify x86 callee-preserved FPR machinery.For more, see this comment and this comment.
github-actions[bot] commented on Issue #1498:
Subscribe to Label Action
cc @bnjbvr
<details>
This issue or pull request has been labeled: "cranelift"Thus the following users have been cc'd because of the following labels:
- bnjbvr: cranelift
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
iximeow edited Issue #1498:
In
isa/x86/abi.rswe have to save callee-preserved FPRs for some calling conventions. We save these to the stack and reload them before exiting, but at the moment the Cranelift IR operationsstack_loadandstack_storeare not directly encodable. In other parts of a function,stack_loadandstack_storewould be legalized and then optimized into the assembly we'd like (movdqa [rsp + offset], xmm*), but prologue/epilogue addition happen after both legalization and register allocation.When
stack_loadandstack_storecan be directly encoded, we can switch to those, remove an explicitstack_address, and simplify x86 callee-preserved FPR machinery. #1198 adds these encodings.For more, see this comment and this comment.
bjorn3 commented on Issue #1498:
I think this is fixed with the new backend framework.
cfallin closed Issue #1498:
In
isa/x86/abi.rswe have to save callee-preserved FPRs for some calling conventions. We save these to the stack and reload them before exiting, but at the moment the Cranelift IR operationsstack_loadandstack_storeare not directly encodable. In other parts of a function,stack_loadandstack_storewould be legalized and then optimized into the assembly we'd like (movdqa [rsp + offset], xmm*), but prologue/epilogue addition happen after both legalization and register allocation.When
stack_loadandstack_storecan be directly encoded, we can switch to those, remove an explicitstack_address, and simplify x86 callee-preserved FPR machinery. #1198 adds these encodings.For more, see this comment and this comment.
Last updated: Dec 13 2025 at 19:03 UTC