From 2d154fcd0de0612f58abbc5027f409b9b2eb0dc2 Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Thu, 28 Sep 2023 05:47:33 +0000 Subject: [PATCH] 8316566: RISC-V: Zero extended narrow oop passed to Atomic::cmpxchg Reviewed-by: luhenry, fyang --- src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp b/src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp index 2b500376f9b..a7dc84770f8 100644 --- a/src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp +++ b/src/hotspot/os_cpu/linux_riscv/orderAccess_linux_riscv.hpp @@ -37,7 +37,7 @@ inline void OrderAccess::storestore() { release(); } inline void OrderAccess::loadstore() { acquire(); } inline void OrderAccess::storeload() { fence(); } -#define FULL_MEM_BARRIER __sync_synchronize() +#define FULL_MEM_BARRIER __atomic_thread_fence(__ATOMIC_SEQ_CST); #define READ_MEM_BARRIER __atomic_thread_fence(__ATOMIC_ACQUIRE); #define WRITE_MEM_BARRIER __atomic_thread_fence(__ATOMIC_RELEASE);