File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -51,5 +51,10 @@ public enum Platform
51
51
/// A PowerPC 64-bit (little-endian) processor architecture.
52
52
/// </summary>
53
53
Ppc64le ,
54
+
55
+ /// <summary>
56
+ /// A RiscV 64-bit processor architecture.
57
+ /// </summary>
58
+ RiscV64 ,
54
59
}
55
60
}
Original file line number Diff line number Diff line change @@ -207,12 +207,13 @@ internal static Runtime GetCurrentRuntime()
207
207
public static Platform GetCurrentPlatform ( )
208
208
{
209
209
// these are not part of .NET Standard 2.0, so we use hardcoded values taken from
210
- // https://github.com/dotnet/runtime/blob/1a37caf773a3b857ccff49a31be3333d4fdc491f /src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs#L9
210
+ // https://github.com/dotnet/runtime/blob/080fcae7eaa8367abf7900e08ff2e52e3efea5bf /src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Architecture.cs#L9
211
211
const Architecture Wasm = ( Architecture ) 4 ;
212
212
const Architecture S390x = ( Architecture ) 5 ;
213
213
const Architecture LoongArch64 = ( Architecture ) 6 ;
214
214
const Architecture Armv6 = ( Architecture ) 7 ;
215
215
const Architecture Ppc64le = ( Architecture ) 8 ;
216
+ const Architecture RiscV64 = ( Architecture ) 9 ;
216
217
217
218
switch ( ProcessArchitecture )
218
219
{
@@ -234,6 +235,8 @@ public static Platform GetCurrentPlatform()
234
235
return Platform . Armv6 ;
235
236
case Ppc64le :
236
237
return Platform . Ppc64le ;
238
+ case RiscV64 :
239
+ return Platform . RiscV64 ;
237
240
default :
238
241
throw new ArgumentOutOfRangeException ( ) ;
239
242
}
You can’t perform that action at this time.
0 commit comments