Skip to content

Commit

Permalink
Add support for riscv64
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel A. Fernandez Montecelo authored and jcharaoui committed Dec 9, 2022
1 parent ab44c9d commit ea30e74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/kenai/jffi/Platform.java
Expand Up @@ -110,6 +110,8 @@ public enum CPU {
MIPSEL(32),
/** MIPS64EL */
MIPS64EL(64),
/** RISCV64 */
RISCV64(64),
/** Unknown CPU */
UNKNOWN(64);

Expand Down Expand Up @@ -255,6 +257,9 @@ private static CPU determineCPU() {

} else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
return CPU.MIPS64EL;

} else if (Util.equalsIgnoreCase("riscv64", archString, LOCALE)) {
return CPU.RISCV64;
}


Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/kenai/jffi/internal/StubLoader.java
Expand Up @@ -165,6 +165,8 @@ public enum CPU {
MIPSEL,
/** MIPS 64-bit little endian */
MIPS64EL,
/** RISC-V 64-bit little endian */
RISCV64,
/** Unknown CPU */
UNKNOWN;

Expand Down Expand Up @@ -237,6 +239,8 @@ private static CPU determineCPU() {
return CPU.MIPSEL;
} else if (Util.equalsIgnoreCase("mips64", archString, LOCALE) || Util.equalsIgnoreCase("mips64el", archString, LOCALE)) {
return CPU.MIPS64EL;
} else if (Util.equalsIgnoreCase("riscv64", archString, LOCALE)) {
return CPU.RISCV64;

}

Expand Down

0 comments on commit ea30e74

Please sign in to comment.