70 lines
2.6 KiB
Diff
70 lines
2.6 KiB
Diff
---
|
|
jni/GNUmakefile | 2 +-
|
|
src/main/java/com/kenai/jffi/Platform.java | 7 ++++++-
|
|
src/main/java/com/kenai/jffi/internal/StubLoader.java | 4 ++++
|
|
3 files changed, 11 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/jni/GNUmakefile b/jni/GNUmakefile
|
|
index 40f5275..3be8d08 100755
|
|
--- a/jni/GNUmakefile
|
|
+++ b/jni/GNUmakefile
|
|
@@ -238,7 +238,7 @@ ifeq ($(CPU), sparcv9)
|
|
MODEL=64
|
|
endif
|
|
|
|
-ifneq ($(findstring $(CPU), x86_64 amd64 ppc64 ppc64le powerpc64 s390x aarch64 mips64 mips64el),)
|
|
+ifneq ($(findstring $(CPU), x86_64 amd64 ppc64 ppc64le powerpc64 s390x aarch64 mips64 mips64el loongarch64),)
|
|
MODEL = 64
|
|
endif
|
|
|
|
diff --git a/src/main/java/com/kenai/jffi/Platform.java b/src/main/java/com/kenai/jffi/Platform.java
|
|
index 8850426..4900194 100644
|
|
--- a/src/main/java/com/kenai/jffi/Platform.java
|
|
+++ b/src/main/java/com/kenai/jffi/Platform.java
|
|
@@ -102,7 +102,9 @@ public abstract class Platform {
|
|
ARM(32),
|
|
/** AARCH64 */
|
|
AARCH64(64),
|
|
- /** MIPS64EL */
|
|
+ /** LOONGARCH64*/
|
|
+ LOONGARCH64(64),
|
|
+ /** MIPS64EL */
|
|
MIPS64EL(64),
|
|
/** Unknown CPU */
|
|
UNKNOWN(64);
|
|
@@ -238,6 +240,9 @@ public abstract class Platform {
|
|
} else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) {
|
|
return CPU.AARCH64;
|
|
|
|
+ } else if (Util.equalsIgnoreCase("loongarch64", archString, LOCALE)) {
|
|
+ return CPU.LOONGARCH64;
|
|
+
|
|
} else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
|
|
return CPU.MIPS64EL;
|
|
}
|
|
diff --git a/src/main/java/com/kenai/jffi/internal/StubLoader.java b/src/main/java/com/kenai/jffi/internal/StubLoader.java
|
|
index 77da24d..d8af032 100644
|
|
--- a/src/main/java/com/kenai/jffi/internal/StubLoader.java
|
|
+++ b/src/main/java/com/kenai/jffi/internal/StubLoader.java
|
|
@@ -142,6 +142,8 @@ public class StubLoader {
|
|
ARM,
|
|
/** AArch64 */
|
|
AARCH64,
|
|
+ /** LoongArch64 */
|
|
+ LOONGARCH64,
|
|
/** MIPS 64-bit little endian */
|
|
MIPS64EL,
|
|
/** Unknown CPU */
|
|
@@ -208,6 +210,8 @@ public class StubLoader {
|
|
return CPU.ARM;
|
|
} else if (Util.equalsIgnoreCase("aarch64", archString, LOCALE)) {
|
|
return CPU.AARCH64;
|
|
+ } else if (Util.equalsIgnoreCase("loongarch64", archString, LOCALE)) {
|
|
+ return CPU.LOONGARCH64;
|
|
} else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
|
|
return CPU.MIPS64EL;
|
|
|
|
--
|
|
2.33.0
|
|
|