From 87ec4e11c91d83e0930ceab5b8e6c17b3f157dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 12 Aug 2024 04:21:51 +0200 Subject: [PATCH] compiler-rt: Fix the leoncasa CPU feature check for sparc32. --- lib/compiler_rt/atomics.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compiler_rt/atomics.zig b/lib/compiler_rt/atomics.zig index e82b6ab055..2e5989336c 100644 --- a/lib/compiler_rt/atomics.zig +++ b/lib/compiler_rt/atomics.zig @@ -30,7 +30,7 @@ const largest_atomic_size = switch (arch) { // On SPARC systems that lacks CAS and/or swap instructions, the only // available atomic operation is a test-and-set (`ldstub`), so we force // every atomic memory access to go through the lock. - .sparc => if (cpu.features.featureSetHas(.hasleoncasa)) @sizeOf(usize) else 0, + .sparc => if (std.Target.sparc.featureSetHas(builtin.cpu.features, .hasleoncasa)) @sizeOf(usize) else 0, // XXX: On x86/x86_64 we could check the presence of cmpxchg8b/cmpxchg16b // and set this parameter accordingly.