-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[NativeAOT/ARM] Interlocked tests fail #97730
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue Details
|
Looks like missing zero extension / sign extension in the assembly helpers added in #97588 |
That was also my first thought. When I read the ARM ABI documentation it seemed to suggest that the caller is responsible for that for arguments passed in the registers (so logically the helpers should be responsible for return value, which could be the missing piece). Clang did generate some zero extension for the 16-bit versions but not for the 8-bit versions. |
Thanks for the pointer. I double checked the assembly and both |
FWIW, this seems to fix the issue (and match GCC generated code):
I am just not sure how to justify the 16-bit argument needing a zero-extension, while the 8-bit one doesn't need it. I need to dig into the ABI docs. |
Procedure Call Standard for the Arm Architecture, section 6.5 Parameter Passing, states the following:
|
Ah... I see... the prototype of the managed version is using |
The
JIT/Intrinsics/Interlocked_r
test running under QEMU ARM user emulation:The text was updated successfully, but these errors were encountered: