On Mon, 16 Oct 2023 22:56:42 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> Martin Doerr has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert changes to PlatformLayouts.java > > src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/aix/AixPPC64Linker.java > line 64: > >> 62: // Note: It is possible to enforce 8-byte alignment by #pragma >> align (natural) >> 63: // Therefore, we use normal checks if we are already 8-byte >> aligned. >> 64: if ((offset % 8 != 0) && (member instanceof ValueLayout vl && >> vl.carrier() == double.class)) { > > I think you should check for the correct byte order as well at some point, > for this special case Done. Thanks! > test/micro/org/openjdk/bench/java/lang/foreign/pointers/NativeType.java line > 61: > >> 59: @Override >> 60: public ValueLayout.OfInt layout() { >> 61: return (ValueLayout.OfInt) >> LINKER.canonicalLayouts().get("int"); > > For this benchmark, we rely on constant folding through these layouts. So, we > shouldn't go through `canonicalLayouts` here. We can store the layout in a > `static final` field, and then return it here instead. Done. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16179#discussion_r1362195270 PR Review Comment: https://git.openjdk.org/jdk/pull/16179#discussion_r1362194981