mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.mem: work around LoongArch inline asm bug in doNotOptimizeAway()
https://github.com/llvm/llvm-project/issues/159200
This commit is contained in:
parent
7d8a954578
commit
90c1123d1c
1 changed files with 2 additions and 1 deletions
|
|
@ -4485,7 +4485,8 @@ pub fn doNotOptimizeAway(val: anytype) void {
|
|||
} else doNotOptimizeAway(&val);
|
||||
},
|
||||
.float => {
|
||||
if ((t.float.bits == 32 or t.float.bits == 64) and builtin.zig_backend != .stage2_c) {
|
||||
// https://github.com/llvm/llvm-project/issues/159200
|
||||
if ((t.float.bits == 32 or t.float.bits == 64) and builtin.zig_backend != .stage2_c and !builtin.cpu.arch.isLoongArch()) {
|
||||
asm volatile (""
|
||||
:
|
||||
: [_] "rm" (val),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue