authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-05-02 12:49:43+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-05-03 12:32:13+02:00
log792cf925ec170ddcb42a2d78ab8f464642e92b17
tree686d82c0cf2c0fa4d77dffa8d204c9ac638a3828
parentb10d40b89bca0f70944434a1e0ffbfb984b4eae5

std: Fix missing CPU feature check

We need both the v6k and the v6m checks.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/Thread.zig+1-1
...@@ -75,7 +75,7 @@ pub fn spinLoopHint() callconv(.Inline) void {...@@ -75,7 +75,7 @@ pub fn spinLoopHint() callconv(.Inline) void {
75 },75 },
76 .arm, .armeb, .thumb, .thumbeb => {76 .arm, .armeb, .thumb, .thumbeb => {
77 // `yield` was introduced in v6k but are also available on v6m.77 // `yield` was introduced in v6k but are also available on v6m.
78 const can_yield = comptime std.Target.arm.featureSetHas(std.Target.current.cpu.features, .has_v6m);78 const can_yield = comptime std.Target.arm.featureSetHasAny(std.Target.current.cpu.features, .{ .has_v6k, .has_v6m });
79 if (can_yield) asm volatile ("yield" ::: "memory");79 if (can_yield) asm volatile ("yield" ::: "memory");
80 },80 },
81 .aarch64, .aarch64_be, .aarch64_32 => {81 .aarch64, .aarch64_be, .aarch64_32 => {