Update calling conventions for wasm functions slightly#6676
Merged
fitzgen merged 2 commits intobytecodealliance:mainfrom Jul 6, 2023
Merged
Update calling conventions for wasm functions slightly#6676fitzgen merged 2 commits intobytecodealliance:mainfrom
fitzgen merged 2 commits intobytecodealliance:mainfrom
Conversation
This resolves two issues from recent changes in bytecodealliance#6649: * First the s390x calling convention for wasm functions is changed back to `WasmtimeSystemV` from `Fast`. This was an accidental omission from bytecodealliance#6649 where the conclusion was that s390x will continue using a calling convention with little-endian lane order for lane arguments. The only calling convention that supports this today is `WasmtimeSystemV`, although the `Tail` calling convention will likely use it in the future as well. * Second the apple-aarch64 platform now uses the `Fast` calling convention instead of `AppleAarch64` calling convention. That convention was specified in bytecodealliance#4195 but local testing shows that is not necessary in the sense that tests all pass with the `Fast` calling convention. This means that the prior comment why the `AppleAarch64` calling convention is required is no longer accurate and in the absence of a reason not to I went ahead and switched it to `Fast`. In the near future all wasm functions will unconditionally use the `Tail` calling convention and at that time the lane order can be specified on s390x to be little-endian to satisfy all the constraints here. Additionally any unwinding directives, if necessary for aarch64, can be specified as needed.
fitzgen
approved these changes
Jul 6, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves two issues from recent changes in #6649:
First the s390x calling convention for wasm functions is changed back to
WasmtimeSystemVfromFast. This was an accidental omission from Remove Wasmtime ABIs from Cranelift #6649 where the conclusion was that s390x will continue using a calling convention with little-endian lane order for lane arguments. The only calling convention that supports this today isWasmtimeSystemV, although theTailcalling convention will likely use it in the future as well.Second the apple-aarch64 platform now uses the
Fastcalling convention instead ofAppleAarch64calling convention. That convention was specified in CFI improvements to the AArch64 fiber implementation #4195 but local testing shows that is not necessary in the sense that tests all pass with theFastcalling convention. This means that the prior comment why theAppleAarch64calling convention is required is no longer accurate and in the absence of a reason not to I went ahead and switched it toFast.In the near future all wasm functions will unconditionally use the
Tailcalling convention and at that time the lane order can be specified on s390x to be little-endian to satisfy all the constraints here. Additionally any unwinding directives, if necessary for aarch64, can be specified as needed.