Skip to content

Commit

Permalink
Merge pull request #136 from jcharaoui/add-riscv64
Browse files Browse the repository at this point in the history
Add support for riscv64
  • Loading branch information
headius authored Dec 10, 2022
2 parents ab44c9d + ea30e74 commit 20c98b3
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 20c98b3

Please sign in to comment.