From f5e5eac3b9c8458eef17ffe062507fd0b531f0a0 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 29 May 2022 14:46:05 +0100 Subject: Add cmpxchg16b --- core/simd/x86/cmpxchg16b.odin | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 core/simd/x86/cmpxchg16b.odin diff --git a/core/simd/x86/cmpxchg16b.odin b/core/simd/x86/cmpxchg16b.odin new file mode 100644 index 000000000..d575dd9df --- /dev/null +++ b/core/simd/x86/cmpxchg16b.odin @@ -0,0 +1,8 @@ +//+build amd64 +package simd_x86 + +import "core:intrinsics" + +cmpxchg16b :: #force_inline proc "c" (dst: ^u128, old, new: u128, $success, $failure: intrinsics.Atomic_Memory_Order) -> (val: u128) { + return intrinsics.atomic_compare_exchange_strong_explicit(dst, old, new, success, failure) +} \ No newline at end of file -- cgit v1.2.3