[RISC-V] Missing defines in GC (#88661)
authorAlexander Soldatov <soldatov.a@samsung.com>
Wed, 12 Jul 2023 21:35:22 +0000 (00:35 +0300)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 21:35:22 +0000 (14:35 -0700)
src/coreclr/gc/env/gcenv.interlocked.inl
src/coreclr/gc/gc.cpp
src/coreclr/gc/unix/gcenv.unix.cpp

index 136348b..3e4d761 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef _MSC_VER
 __forceinline void Interlocked::InterlockedOperationBarrier()
 {
-#if defined(HOST_ARM64) || defined(HOST_LOONGARCH64)
+#if defined(HOST_ARM64) || defined(HOST_LOONGARCH64) || defined(HOST_RISCV64)
     // See PAL_InterlockedOperationBarrier() in the PAL
     __sync_synchronize();
 #endif
index cd1736a..14af5f3 100644 (file)
@@ -26240,7 +26240,7 @@ void gc_heap::save_post_plug_info (uint8_t* last_pinned_plug, uint8_t* last_obje
 }
 
 // enable on processors known to have a useful prefetch instruction
-#if defined(TARGET_AMD64) || defined(TARGET_X86) || defined(TARGET_ARM64)
+#if defined(TARGET_AMD64) || defined(TARGET_X86) || defined(TARGET_ARM64) || defined(TARGET_RISCV64)
 #define PREFETCH
 #endif
 
index a024d3f..285b783 100644 (file)
@@ -136,7 +136,7 @@ typedef cpuset_t cpu_set_t;
 #endif
 #endif // __APPLE__
 
-#if defined(HOST_ARM) || defined(HOST_ARM64) || defined(HOST_LOONGARCH64)
+#if defined(HOST_ARM) || defined(HOST_ARM64) || defined(HOST_LOONGARCH64) || defined(HOST_RISCV64)
 #define SYSCONF_GET_NUMPROCS _SC_NPROCESSORS_CONF
 #else
 #define SYSCONF_GET_NUMPROCS _SC_NPROCESSORS_ONLN