mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 04:25:05 +00:00
std: Fix missing CPU feature check
We need both the v6k and the v6m checks.
This commit is contained in:
parent
b10d40b89b
commit
792cf925ec
@ -75,7 +75,7 @@ pub fn spinLoopHint() callconv(.Inline) void {
|
||||
},
|
||||
.arm, .armeb, .thumb, .thumbeb => {
|
||||
// `yield` was introduced in v6k but are also available on v6m.
|
||||
const can_yield = comptime std.Target.arm.featureSetHas(std.Target.current.cpu.features, .has_v6m);
|
||||
const can_yield = comptime std.Target.arm.featureSetHasAny(std.Target.current.cpu.features, .{ .has_v6k, .has_v6m });
|
||||
if (can_yield) asm volatile ("yield" ::: "memory");
|
||||
},
|
||||
.aarch64, .aarch64_be, .aarch64_32 => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user