diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-05-02 12:49:43 +0200 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2021-05-03 12:32:13 +0200 |
| commit | 792cf925ec170ddcb42a2d78ab8f464642e92b17 (patch) | |
| tree | 686d82c0cf2c0fa4d77dffa8d204c9ac638a3828 | |
| parent | b10d40b89bca0f70944434a1e0ffbfb984b4eae5 (diff) | |
| download | zig-792cf925ec170ddcb42a2d78ab8f464642e92b17.tar.gz zig-792cf925ec170ddcb42a2d78ab8f464642e92b17.zip | |
std: Fix missing CPU feature check
We need both the v6k and the v6m checks.
| -rw-r--r-- | lib/std/Thread.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index 39d37f2e5f..84b91b2de3 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -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 => { |
