Skip to content

Commit

Permalink
compiler-rt: Fix the leoncasa CPU feature check for sparc32.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp authored and andrewrk committed Aug 12, 2024
1 parent f7fb261 commit 87ec4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compiler_rt/atomics.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 87ec4e1

Please sign in to comment.