[foreign-memaccess+abi] RFR: 8275584: Incorrect stack spilling in CallArranger on MacOS/AArch64 [v2]
Jorn Vernee
jvernee at openjdk.org
Mon Oct 24 14:33:18 UTC 2022
On Mon, 24 Oct 2022 13:57:31 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Nick Gasson has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove sign-extension XXX
>
> src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/CallArranger.java line 290:
>
>> 288: long copy = Math.min(layout.byteSize() - offset, STACK_SLOT_SIZE);
>> 289: VMStorage storage =
>> 290: storageCalculator.stackAlloc(copy, layout.byteAlignment(), false);
>
> Ok. So it looks like only HFAs are 'packed', and other struck follow the classic approach of passing everything in stack slot sized chunks :/
I think maybe passing `layout.byteAlignment` here is a little misleading, as it is unconditionally overwritten to `STACK_SLOT_SIZE` in `stackAlloc` any ways.
I know that's a change I made, but I think it might be better to just use `STACK_SLOT_SIZE` as alignment here, and then I don't think the extra `subSlotPacking` parameter is needed either.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/746
More information about the panama-dev
mailing list