RFR: 8262901: [macos_aarch64] NativeCallTest expected:<-3.8194101E18> but was:<3.02668882E10> [v2]

Tom Shull duke at openjdk.java.net
Wed Jan 19 08:55:29 UTC 2022


On Wed, 19 Jan 2022 08:18:04 GMT, Tom Shull <duke at openjdk.java.net> wrote:

>> Danil Bubnov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add test with an odd number of arguments
>
> src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java line 287:
> 
>> 285:             }
>> 286:         }
>> 287:         if (currentStackOffset % target.stackAlignment != 0) {
> 
> I think this must be taken care of somewhere else. Otherwise, amd64 would also have this same problem, as its stack alignment is also 16 bytes

The SIGBUS issue looks to be more a problem with AArch64TestAssembler.java rather than an issue here. It would be best to align stack size at [        emitGrowStack(cc.getStackSize());](https://github.com/openjdk/jdk/blob/44fe958c8a924dda436125716b164a335199e22b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/aarch64/AArch64TestAssembler.java#L272) and         [emitGrowStack(-cc.getStackSize()); ](https://github.com/openjdk/jdk/blob/44fe958c8a924dda436125716b164a335199e22b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/aarch64/AArch64TestAssembler.java#L282)

The same thing could be done to AMD64TestAssembler. 

At least for graal, this more closely matches the logic of [AArchFrameMap](https://github.com/oracle/graal/blob/bf17700b2593f7e4a2c71f465d53a96a38f92048/compiler/src/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64FrameMap.java#L100) and [AMD64FrameMap](https://github.com/oracle/graal/blob/bf17700b2593f7e4a2c71f465d53a96a38f92048/compiler/src/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64FrameMap.java#L109)

-------------

PR: https://git.openjdk.java.net/jdk/pull/6641


More information about the hotspot-compiler-dev mailing list