Remove of @extname in stdlib.

This commit is contained in:
Christoffer Lerno
2023-02-02 21:53:37 +01:00
parent 3b3dd334e0
commit 6407eb47a4
29 changed files with 136 additions and 136 deletions

View File

@@ -30,7 +30,7 @@ private const double[*] AT = {
1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */
};
fn double _atan(double x) @weak @extname("atan")
fn double _atan(double x) @weak @extern("atan")
{
int id = void;
uint ix = x.high_word();
@@ -113,7 +113,7 @@ private const float[*] ATF = {
6.1687607318e-02,
};
fn float _atanf(float x) @weak @extname("atanf")
fn float _atanf(float x) @weak @extern("atanf")
{
int id = void;
uint ix = x.word();
@@ -186,7 +186,7 @@ private macro void extract_words(double d, uint* hi, uint* lo)
*lo = (uint)rep;
}
fn double _atan2(double y, double x) @weak @extname("atan2")
fn double _atan2(double y, double x) @weak @extern("atan2")
{
if (math::is_nan(x) || math::is_nan(y)) return x + y;
@@ -257,7 +257,7 @@ fn double _atan2(double y, double x) @weak @extname("atan2")
private const float PI_F = 3.1415927410e+00; /* 0x40490fdb */
private const float PI_LO_F = -8.7422776573e-08; /* 0xb3bbbd2e */
fn float _atan2f(float y, float x) @weak @extname("atan2f")
fn float _atan2f(float y, float x) @weak @extern("atan2f")
{
if (math::is_nan(x) || math::is_nan(y)) return x + y;
uint ix = bitcast(x, uint);

View File

@@ -2,7 +2,7 @@ module std::math::nolibc;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn double _ceil(double x) @weak @extname("ceil")
fn double _ceil(double x) @weak @extern("ceil")
{
ulong ui = bitcast(x, ulong);
int e = (int)((ui >> 52) & 0x7ff);
@@ -19,7 +19,7 @@ fn double _ceil(double x) @weak @extname("ceil")
}
fn float _ceilf(float x) @weak @extname("ceilf")
fn float _ceilf(float x) @weak @extern("ceilf")
{
uint u = bitcast(x, uint);
int e = (int)((u >> 23) & 0xff) - 0x7f;

View File

@@ -2,7 +2,7 @@ module std::math::nolibc;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn double _floor(double x) @weak @extname("floor")
fn double _floor(double x) @weak @extern("floor")
{
ulong ui = bitcast(x, ulong);
int e = (int)((ui >> 52) & 0x7ff);
@@ -19,7 +19,7 @@ fn double _floor(double x) @weak @extname("floor")
}
fn float _floorf(float x) @weak @extname("floorf")
fn float _floorf(float x) @weak @extern("floorf")
{
uint u = bitcast(x, uint);
int e = (int)((u >> 23) & 0xff) - 0x7f;

View File

@@ -2,12 +2,12 @@ module std::math::nolibc;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn float powf_broken(float x, float f) @extname("powf") @weak
fn float powf_broken(float x, float f) @extern("powf") @weak
{
unreachable("'powf' not supported");
}
fn double pow_broken(double x, double y) @extname("pow") @weak
fn double pow_broken(double x, double y) @extern("pow") @weak
{
unreachable("'pow' not supported");
}

View File

@@ -2,7 +2,7 @@ module std::math::nolibc;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn double _round(double x) @extname("round") @weak
fn double _round(double x) @extern("round") @weak
{
ulong u = bitcast(x, ulong);
int e = (int)((u >> 52) & 0x7ff);
@@ -28,7 +28,7 @@ fn double _round(double x) @extname("round") @weak
return y;
}
fn float _roundf(float x) @extname("roundf") @weak
fn float _roundf(float x) @extern("roundf") @weak
{
uint u = bitcast(x, uint);
int e = (u >> 23) & 0xff;

View File

@@ -2,7 +2,7 @@ module std::math::nolibc;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn double _scalbn(double x, int n) @weak @extname("scalbn")
fn double _scalbn(double x, int n) @weak @extern("scalbn")
{
switch
{

View File

@@ -18,7 +18,7 @@ $if (!env::COMPILER_LIBC_AVAILABLE):
* ====================================================
*/
fn float _sinf(float x) @weak @extname("sinf")
fn float _sinf(float x) @weak @extern("sinf")
{
uint ix = bitcast(x, uint);
int sign = ix >> 31;

View File

@@ -2,7 +2,7 @@ module std::math::nolibc::trig;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn double sincos_broken(double x) @extname("sincos") @weak
fn double sincos_broken(double x) @extern("sincos") @weak
{
unreachable("'sinccos' not supported");
}

View File

@@ -2,7 +2,7 @@ module std::math::nolibc;
$if (!env::COMPILER_LIBC_AVAILABLE):
fn double _trunc(double x) @weak @extname("trunc")
fn double _trunc(double x) @weak @extern("trunc")
{
ulong i = bitcast(x, ulong);
int e = (int)((i >> 52) & 0x7ff) - 0x3ff + 12;
@@ -15,7 +15,7 @@ fn double _trunc(double x) @weak @extname("trunc")
return bitcast(i, double);
}
fn float _truncf(float x) @weak @extname("truncf")
fn float _truncf(float x) @weak @extern("truncf")
{
uint i = bitcast(x, uint);
int e = (int)((i >> 23) & 0xff) - 0x7f + 9;