Skip to content

Commit

Permalink
std/math/hardware.d: Fix compile error for LoongArch
Browse files Browse the repository at this point in the history
```
std/math/hardware.d(187):1:19: error: invalid operand for instruction
        movfcsr2gr $a0, $r2
```
  • Loading branch information
heiher authored and dlang-bot committed May 9, 2024
1 parent f9fa135 commit 1a8d2ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/math/hardware.d
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private:
uint result = void;
asm pure nothrow @nogc
{
"movfcsr2gr %0,$r2" : "=r" (result);
"movfcsr2gr %0, $fcsr2" : "=r" (result);
}
return result & EXCEPTIONS_MASK;
}
Expand Down Expand Up @@ -883,7 +883,7 @@ private:
ControlState cont;
asm pure nothrow @nogc
{
"movfcsr2gr %0,$r0" : "=r" (cont);
"movfcsr2gr %0, $fcsr0" : "=r" (cont);
}
cont &= (roundingMask | allExceptions);
return cont;
Expand Down

0 comments on commit 1a8d2ea

Please sign in to comment.