diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-24 21:23:45 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-25 16:15:17 +0200 |
| commit | 5d019abe4ec70373db7a75c2a8a3e2d76939817c (patch) | |
| tree | 4ca5e04afceab7cc8e363d7adfe0436f54a3e82a /lib/std/atomic.zig | |
| parent | 12686d9b7df8fe4c2663cd8e2136991dc3cf661c (diff) | |
| download | zig-5d019abe4ec70373db7a75c2a8a3e2d76939817c.tar.gz zig-5d019abe4ec70373db7a75c2a8a3e2d76939817c.zip | |
start adding big endian RISC-V support
The big endian RISC-V effort is mostly driven by MIPS (the company) which is
pivoting to RISC-V, and presumably needs a big endian variant to fill the niche
that big endian MIPS (the ISA) did.
GCC already supports these targets, but LLVM support will only appear in 22;
this commit just adds the necessary target knowledge and checks on our end.
Diffstat (limited to 'lib/std/atomic.zig')
| -rw-r--r-- | lib/std/atomic.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/atomic.zig b/lib/std/atomic.zig index 194f645975..64926dbc4f 100644 --- a/lib/std/atomic.zig +++ b/lib/std/atomic.zig @@ -386,7 +386,9 @@ pub inline fn spinLoopHint() void { => asm volatile ("pause(#1)"), .riscv32, + .riscv32be, .riscv64, + .riscv64be, => if (comptime builtin.cpu.has(.riscv, .zihintpause)) { asm volatile ("pause"); }, |
