Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from ChengJin01/jep424_enable_upcall_jdk19_s39…
Browse files Browse the repository at this point in the history
…0x_aarc64_x86

[JEP424] Enable FFI Upcall on s390x/Aarch64/x86 in JDK19
  • Loading branch information
tajila authored Sep 6, 2022
2 parents f520756 + 2e39007 commit 034a8c8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDe

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, MemorySession session) {
throw new InternalError("arrangeUpcall is not yet implemented"); //$NON-NLS-1$
return UpcallLinker.make(target, mt, cDesc, session);
}

private static boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDe

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, MemorySession session) {
throw new InternalError("arrangeUpcall is not yet implemented"); //$NON-NLS-1$
return UpcallLinker.make(target, mt, cDesc, session);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDe

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, MemorySession session) {
throw new InternalError("arrangeUpcall is not yet implemented"); //$NON-NLS-1$
return UpcallLinker.make(target, mt, cDesc, session);
}

private static boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static MethodHandle arrangeDowncall(MethodType mt, FunctionDescriptor cDe

/* Replace UpcallLinker in OpenJDK with the implementation of UpcallLinker specific to OpenJ9 */
public static MemorySegment arrangeUpcall(MethodHandle target, MethodType mt, FunctionDescriptor cDesc, MemorySession session) {
throw new InternalError("arrangeUpcall is not yet implemented"); //$NON-NLS-1$
return UpcallLinker.make(target, mt, cDesc, session);
}

private static boolean isInMemoryReturn(Optional<MemoryLayout> returnLayout) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,12 @@ boolean open() {

@Override
public long find(String name) {
return NativeLibraries.findEntryInProcess(name);
boolean isAixOS = System.getProperty("os.name").toLowerCase().contains("aix");
if (isAixOS) {
return NativeLibraries.findEntryInProcess(name);
} else {
throw new UnsupportedOperationException("Cannot find on non-AIX platforms");
}
}

};
Expand Down

0 comments on commit 034a8c8

Please sign in to comment.