-0xFF will now be a signed integer.

- `-2147483648`, MIN literals work correctly.
This commit is contained in:
Christoffer Lerno
2025-06-04 15:20:49 +02:00
parent 9645bd3289
commit 72cc8e430a
4 changed files with 98 additions and 25 deletions

View File

@@ -35,7 +35,7 @@ fn double fmod(double x, double y) @extern("fmod") @weak @nostrip
}
else
{
uxi &= -1UL >> 12;
uxi &= (ulong)-1 >> 12;
uxi |= 1UL << 52;
}
if (!ey)
@@ -45,7 +45,7 @@ fn double fmod(double x, double y) @extern("fmod") @weak @nostrip
}
else
{
uy.i &= -1UL >> 12;
uy.i &= (ulong)-1 >> 12;
uy.i |= 1UL << 52;
}
@@ -105,7 +105,7 @@ fn float fmodf(float x, float y) @extern("fmodf") @weak @nostrip
}
else
{
uxi &= -1U >> 9;
uxi &= (uint)-1 >> 9;
uxi |= 1U << 23;
}
if (!ey)
@@ -115,7 +115,7 @@ fn float fmodf(float x, float y) @extern("fmodf") @weak @nostrip
}
else
{
uy.i &= -1U >> 9;
uy.i &= (ulong)-1 >> 9;
uy.i |= 1U << 23;
}