RFR: 8262901: [macos_aarch64] NativeCallTest expected:<-3.8194101E18> but was:<3.02668882E10> [v2]
Dean Long
dlong at openjdk.java.net
Tue Jan 18 17:24:30 UTC 2022
On Thu, 2 Dec 2021 07:00:52 GMT, Danil Bubnov <duke at openjdk.java.net> wrote:
>> This is the fix of aarch64 jvmci calling convention.
>>
>> On MacOS/aarch64 "Function arguments may consume slots on the stack that are not multiples of 8 bytes" [1], but current approach uses only wordsize or bigger slots, which is incorrect (that is why tests were failing [4]). Now arguments consume the right amount of bytes.
>>
>> Another problem is that current approach don't make 16-byte alignment of Stack Pointer [1][2][3]. However, tests not fail on Linux/aarch64 and Windows/aarch64. They pass because in this tests all functions have even number of argumets, that is why 16-byte alignment comes automatically. But if you try to add or delete one argumets, tests will fail with SIGBUS.
>>
>> I've tested this patch on MacOS/aarch64 and Linux/aarch64, all tests have passed.
>>
>> Also I don't understand, why current tests (NativeCallTest) use only int, long, float and double as arguments types. Is it possible to add functions with another types like byte or short? I tried, but it fails on every platform.
>>
>> [1] https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
>> [2] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#the-stack
>> [3] https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-160#stack
>> [4] https://bugs.openjdk.java.net/browse/JDK-8262901
>
> Danil Bubnov has updated the pull request incrementally with one additional commit since the last revision:
>
> Add test with an odd number of arguments
Looks OK to me. @dougxc or @tkrodriguez, could you look at this too?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6641
More information about the hotspot-compiler-dev
mailing list