[foreign-memaccess+abi] RFR: 8303017: Passing by-value structs whose size is not power of 2 doesn't work on all platforms [v2]
Jorn Vernee
jvernee at openjdk.org
Thu Mar 2 17:47:41 UTC 2023
On Thu, 2 Mar 2023 12:00:10 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>>
>> - beef up test
>> - Merge branch 'foreign-memaccess+abi' into OOB
>> - review comments
>> - move pickChunkOffset to SharedUtils
>> - eyeball BE support
>> - forgot bufferStore for AArch64
>> - add check + fix aarch64
>> - polish
>> - polish test
>> - chunked in specializer
>> - ... and 2 more: https://git.openjdk.org/panama-foreign/compare/a7df48c8...84be4370
>
> src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java line 347:
>
>> 345: }
>> 346:
>> 347: public static int byteWidthOfPrimitive(Class<?> type) {
>
> When we create memory access var handles, we use this to compute the byte size of a primitive (`VarHandles::memorySegmentViewHandle`):
>
>
> Wrapper.forPrimitiveType(carrier).bitWidth() / 8
>
>
> Perhaps we should put this into Utils and then reuse in both places?
Good idea. Done.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/806
More information about the panama-dev
mailing list