-
Notifications
You must be signed in to change notification settings - Fork 1.7k
FFI failures on Windows ARM64 #52644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Link to failures? Relevant CLs: https://dart-review.googlesource.com/c/sdk/+/306918 https://dart-review.googlesource.com/c/sdk/+/303424 From just the test names, maybe windows treats varargs differently on arm64 than the other OSes do. |
They all seem related to floats. |
- Don't use float registers - Even for the fixed arguments before the variable arguments - These changes apply only to the arguments not the result TEST=ci Bug: #52644 Change-Id: Ifa600a929f9a54b44e78a6f15eafe1cee7141466 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329803 Reviewed-by: Daco Harkes <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
This fixes an edge case on all ARM64 ABIs, when there is only one argument register remaining and the next argument is a 9-16 byte struct. TEST=ci Bug: #52644 Change-Id: I40d962e6d1b3484dbfcf91f5d6baca0bfec76056 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330161 Reviewed-by: Daco Harkes <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
The remaining bit seems to be handling
on a callback, but not a callout. |
Thanks for fixing the small structs Ryan! Hunch: It might be that we're trying to rely on the upper bits in the stack being zero-ed out but they are not? (That would be something that we provide on calls, but then C code doesn't care. And then we rely on in callbacks but C code doesn't provide it.) Could be something different though. |
I think it's Clang that's wrong. MSVC does the splitting when calling and being called. Clang only does it when being called. |
Switch the Windows ARM64 builds to use MSVC. Clang disagrees with itself about handling of small structs in variadic functions, allowing splitting between the last argument register and the stack as the callee but not as the caller. TEST=ci Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-release-arm-try,vm-ffi-android-release-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-linux-release-arm64-try,vm-mac-debug-arm64-try,vm-mac-release-arm64-try,vm-win-debug-arm64-try,vm-win-release-arm64-try,vm-ffi-qemu-linux-release-riscv64-try,vm-linux-debug-ia32-try,vm-linux-release-ia32-try,vm-win-release-ia32-try,vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-mac-debug-x64-try,vm-mac-release-x64-try,vm-win-debug-x64-try,vm-win-release-x64-try Bug: #52644 Bug: #53829 Change-Id: I2fd6c40620a885479f11bb8528ca1e9df3948a2f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331209 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Daco Harkes <[email protected]> Reviewed-by: Siva Annamalai <[email protected]>
The tests
are failing on configurations
@dcharkes
The text was updated successfully, but these errors were encountered: