[Native Image] Build fail with upcalls, windows platform and without x86-64-v3 support
Describe the Issue
The native-image compiler couldn't deal with upcalls with 7 or more arguments on the windows platform, without x86-64-v3 support. It will throw an exception (should not reach here) On the linux platform, the execurable tells me that my machine doesn't support all the features in x86-64-v3, and the image can be rebuilt with -march=x86-64-v2 But on windows, it will throw this error
Using the latest version of GraalVM can resolve many issues.
- [x] I tried with the latest version of GraalVM.
GraalVM Version
23.0.2+7.1
Operating System and Version
Windows 11 22H2
Build Command
native-image -O3 -march=x86-64-v2 --enable-http --enable-https --enable-native-access=ALL-UNNAMED -H:+UnlockExperimentalVMOptions -H:+ForeignAPISupport --features=com.primogemstudio.engine.NativeImageFeature --gc=serial -jar xxx.jar
hint: the jar file can be found at this link: https://github.com/PrimogemStudio/openminecraft/actions
Expected Behavior
It should create the image successfully
Actual Behavior
It throws an jdk.graal.compiler.debug.GraalError (should not reach here: kind=V128_QWORD input=xmm6|V128_QWORD result=xmm4|V128_QWORD)
Steps to Reproduce
- Register an upcall with 7 or more arguments (harfbuzz paint api contains these callbacks) in a feature
- Run the native-image with this feature
Additional Context
This error only happens on windows platform
Build Log Output and Error Messages
Hi @Jack253-png,
Thank you for reaching out to us! I'll take a closer look into this and I'll keep you updated.
It seems that all upcalls on windows without x86-64-v3 support couldn't be compiled, because currently these upcall stub on windows depends on the xmm4 and xmm6 registers