From 792cf925ec170ddcb42a2d78ab8f464642e92b17 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Sun, 2 May 2021 12:49:43 +0200 Subject: [PATCH] std: Fix missing CPU feature check We need both the v6k and the v6m checks. --- lib/std/Thread.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 => {