mirror of
https://github.com/ziglang/zig.git
synced 2026-02-19 15:58:50 +00:00
std: Add fallback on pre-v6 ARM targets
Thanks xackus for noticing the missing else branch.
This commit is contained in:
parent
792cf925ec
commit
a7f3e12d23
@ -76,7 +76,9 @@ 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.featureSetHasAny(std.Target.current.cpu.features, .{ .has_v6k, .has_v6m });
|
||||
if (can_yield) asm volatile ("yield" ::: "memory");
|
||||
if (can_yield) asm volatile ("yield" ::: "memory")
|
||||
// Fallback.
|
||||
else asm volatile ("" ::: "memory");
|
||||
},
|
||||
.aarch64, .aarch64_be, .aarch64_32 => {
|
||||
asm volatile ("isb" ::: "memory");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user