<div dir="ltr">Hello! <br><div>Under the <a href="https://github.com/openjdk/jdk/pull/21041">pull request</a> I was advised to write about new issues to this email.<br></div><div><br></div><div>I'm building my own port of the Panama project to Android, which uses LibLLVM for native code generation, so I've been doing a lot of research into how the calling convention works there.<br></div><div><br></div><div>Based on the data I received, I created my own <a href="https://github.com/vova7878/PanamaPort/blob/master/AndroidPanama/src/main/java/com/v7878/foreign/_LLVMCallingConvention.java">classifier</a> of structures for the arranger with an eye on LLVM (In most cases, it calculates registers itself)<br></div><div><br></div><div>Initially my implementation rejected structures and sequences of size 0, but then I added support for them back. Everything worked pretty well until I dug into the godbolt tests and compared my implementation to the reference implementation from OpenJDK.</div><div><br></div><div>It seems to me that<a href="https://github.com/openjdk/jdk/blob/260d4658aefe370d8994574c20057de07fd6f197/src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/TypeClass.java#L85"> jdk.internal.foreign.abi.aarch64.TypeClass.isHomogeneousFloatAggregate</a> does not work correctly for union types and sequences with nested GroupLayout. Additionally, I made examples in godbolt that show how it determines HFA<br></div><div><br></div><div>C++ <a href="https://godbolt.org/z/fcsMvaKhd">https://godbolt.org/z/fcsMvaKhd</a></div><div>C <a href="https://godbolt.org/z/er8Yev7ME">https://godbolt.org/z/er8Yev7ME</a></div><div><br></div><div>I don't have a PC on aarch64 to run tests on java, but it looks to me like OpenJDK implementation is not correct for some cases<br></div></div>