File tree Expand file tree Collapse file tree
core/src/main/java/org/jruby/ext Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ public enum CPU_TYPE {
9292 ARM ,
9393 AARCH64 ,
9494 LOONGARCH64 ,
95+ RISCV64 ,
9596 UNKNOWN ;
9697 @ Override
9798 public String toString () { return name ().toLowerCase (LOCALE ); }
@@ -157,6 +158,8 @@ private static final CPU_TYPE determineCPU() {
157158 return CPU .AARCH64 ;
158159 } else if ("loongarch64" .equals (archString )) {
159160 return CPU .LOONGARCH64 ;
161+ } else if ("riscv64" .equals (archString )) {
162+ return CPU .RISCV64 ;
160163 } else if ("universal" .equals (archString )) {
161164 // OS X OpenJDK7 builds report "universal" right now
162165 String bits = SafePropertyAccessor .getProperty ("sun.arch.data.model" );
@@ -217,6 +220,7 @@ private static int determineArchDataModel() {
217220 case S390X :
218221 case AARCH64 :
219222 case LOONGARCH64 :
223+ case RISCV64 :
220224 dataModel = 64 ;
221225 break ;
222226 default :
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ public static String getArchitecture() {
113113 if ("amd64" .equals (architecture )) architecture = "x86_64" ;
114114 if ("aarch64" .equals (architecture ) && Platform .IS_MAC ) architecture = "arm64" ;
115115 if ("loongarch64" .equals (architecture )) architecture = "loongarch64" ;
116+ if ("riscv64" .equals (architecture )) architecture = "riscv64" ;
116117
117118 return architecture ;
118119 }
Original file line number Diff line number Diff line change 8383 <entry location =" lib/jni/i386-FreeBSD" />
8484 <entry location =" lib/jni/i386-OpenBSD" />
8585 <entry location =" lib/jni/loongarch64-Linux" />
86+ <entry location =" lib/jni/riscv64-Linux" />
8687 <entry location =" lib/jni/ppc-AIX" />
8788 <entry location =" lib/jni/ppc64-Linux" />
8889 <entry location =" lib/jni/ppc64le-Linux" />
108109 <entry location =" lib/jni/i386-SunOS" />
109110 <entry location =" lib/jni/i386-Windows" />
110111 <entry location =" lib/jni/loongarch64-Linux" />
112+ <entry location =" lib/jni/riscv64-Linux" />
111113 <entry location =" lib/jni/ppc64-Linux" />
112114 <entry location =" lib/jni/ppc64le-Linux" />
113115 <entry location =" lib/jni/ppc-AIX" />
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ module TestLibrary
2020 "x86_64"
2121 when /loongarch64/
2222 "loongarch64"
23+ when /riscv64/
24+ "riscv64"
2325 when /ppc64|powerpc64/
2426 "powerpc64"
2527 when /ppc|powerpc/
You can’t perform that action at this time.
0 commit comments