From 8372d44b60fb6c208578b7c023dc98a6a12de797 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 15 Jan 2024 06:05:56 -1000 Subject: [PATCH] SCP: Add correct Lock Free asynchronous support for IA64 --- sim_scp_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim_scp_private.h b/sim_scp_private.h index cbe70335..ebbc3325 100644 --- a/sim_scp_private.h +++ b/sim_scp_private.h @@ -268,8 +268,8 @@ extern int32 sim_asynch_inst_latency; #define InterlockedCompareExchangePointerAcquire(Destination, Exchange, Comparand) __sync_val_compare_and_swap(Destination, Comparand, Exchange) #define InterlockedCompareExchangePointerRelease(Destination, Exchange, Comparand) __sync_val_compare_and_swap(Destination, Comparand, Exchange) #elif defined(__DECC_VER) -#define InterlockedCompareExchangePointerAcquire(Destination, Exchange, Comparand) (void *)((int32)_InterlockedCompareExchange64(Destination, Exchange, Comparand)) -#define InterlockedCompareExchangePointerRelease(Destination, Exchange, Comparand) (void *)((int32)_InterlockedCompareExchange64(Destination, Exchange, Comparand)) +#define InterlockedCompareExchangePointerAcquire(Destination, Exchange, Comparand) _InterlockedCompareExchange64_acq(Destination, Exchange, Comparand) +#define InterlockedCompareExchangePointerRelease(Destination, Exchange, Comparand) _InterlockedCompareExchange64_rel(Destination, Exchange, Comparand) #else #error "Implementation of function InterlockedCompareExchangePointer() is needed to build with USE_AIO_INTRINSICS" #endif