libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3, __ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi, __fixsfdi)[__TINYC__]: No stub printing.
This commit is contained in:
parent
ddd8349827
commit
553539ad75
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2017,2018,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -23,20 +23,24 @@
|
||||||
double
|
double
|
||||||
__divdi3 (double a, double b)
|
__divdi3 (double a, double b)
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__divdi3 stub\n");
|
eputs ("__divdi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return ((long) a / (long) b);
|
return ((long) a / (long) b);
|
||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
__moddi3 (double a, double b)
|
__moddi3 (double a, double b)
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__moddi3 stub\n");
|
eputs ("__moddi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return ((long) a % (long) b);
|
return ((long) a % (long) b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,14 +52,16 @@ unsigned long
|
||||||
__udivdi3 (unsigned long a, long ah, unsigned long b)
|
__udivdi3 (unsigned long a, long ah, unsigned long b)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__udivdi3 stub\n");
|
eputs ("__udivdi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
if (!b)
|
#endif
|
||||||
return 0;
|
|
||||||
unsigned long ai = a;
|
unsigned long ai = a;
|
||||||
unsigned long bi = b;
|
unsigned long bi = b;
|
||||||
|
if (!b)
|
||||||
|
return 0;
|
||||||
return ai / bi;
|
return ai / bi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,10 +73,12 @@ unsigned long
|
||||||
__umoddi3 (unsigned long a, long ah, unsigned long b)
|
__umoddi3 (unsigned long a, long ah, unsigned long b)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__umoddi3 stub\n");
|
eputs ("__umoddi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
unsigned long ai = a;
|
unsigned long ai = a;
|
||||||
unsigned long bi = b;
|
unsigned long bi = b;
|
||||||
return ai % bi;
|
return ai % bi;
|
||||||
|
@ -84,17 +92,16 @@ unsigned long
|
||||||
__lshrdi3 (unsigned long a, long ah, long b)
|
__lshrdi3 (unsigned long a, long ah, long b)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__lshrdi3 stub\n");
|
eputs ("__lshrdi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
#if 0 // In some instances, this recurses
|
|
||||||
return a >> b;
|
return a >> b;
|
||||||
#else
|
#else // __TINYC__
|
||||||
for (int i = 0; i < b; i++)
|
for (int i = 0; i < b; i++)
|
||||||
a /= 2;
|
a /= 2;
|
||||||
return a;
|
#endif // __TINYC__
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LONG_LONG
|
#if HAVE_LONG_LONG
|
||||||
|
@ -105,17 +112,17 @@ long
|
||||||
__ashldi3 (long a, long ah, long b)
|
__ashldi3 (long a, long ah, long b)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__ashldi3 stub\n");
|
eputs ("__ashldi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
#if 0 // In some instances, this recurses
|
|
||||||
return a << b;
|
return a << b;
|
||||||
#else
|
#else // __TINYC__
|
||||||
for (int i = 0; i < b; i++)
|
for (int i = 0; i < b; i++)
|
||||||
a += a;
|
a += a;
|
||||||
return a;
|
return a;
|
||||||
#endif
|
#endif // __TINYC__
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LONG_LONG
|
#if HAVE_LONG_LONG
|
||||||
|
@ -126,17 +133,17 @@ long
|
||||||
__ashrdi3 (long a, long ah, long b)
|
__ashrdi3 (long a, long ah, long b)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__ashrdi3 stub\n");
|
eputs ("__ashrdi3 stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
#if 0 // In some instances, this recurses
|
|
||||||
return a >> b;
|
return a >> b;
|
||||||
#else
|
#else // __TINYC__
|
||||||
for (int i = 0; i < b; i++)
|
for (int i = 0; i < b; i++)
|
||||||
a /= 2;
|
a /= 2;
|
||||||
return a;
|
return a;
|
||||||
#endif
|
#endif // __TINYC__
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_LONG_LONG && HAVE_FLOAT
|
#if HAVE_LONG_LONG && HAVE_FLOAT
|
||||||
|
@ -147,10 +154,12 @@ double
|
||||||
__floatundixf (unsigned long a)
|
__floatundixf (unsigned long a)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__floatundixf stub\n");
|
eputs ("__floatundixf stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,10 +170,12 @@ unsigned long
|
||||||
#endif
|
#endif
|
||||||
__fixunsxfdi (double a1)
|
__fixunsxfdi (double a1)
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__fixunsxfdi stub\n");
|
eputs ("__fixunsxfdi stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,10 +188,12 @@ long long
|
||||||
#endif // !__TINYCC__
|
#endif // !__TINYCC__
|
||||||
__fixdfdi (double a1)
|
__fixdfdi (double a1)
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__fixdfdi stub\n");
|
eputs ("__fixdfdi stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,10 +205,12 @@ unsigned long
|
||||||
__fixxfdi (double a1)
|
__fixxfdi (double a1)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__fixxfdi stub\n");
|
eputs ("__fixxfdi stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,9 +221,11 @@ long
|
||||||
#endif
|
#endif
|
||||||
__fixsfdi (double a1)
|
__fixsfdi (double a1)
|
||||||
{
|
{
|
||||||
|
#if !__TINYC__
|
||||||
static int stub = 0;
|
static int stub = 0;
|
||||||
if (__mes_debug () && !stub)
|
if (__mes_debug () && !stub)
|
||||||
eputs ("__fixsfdi stub\n");
|
eputs ("__fixsfdi stub\n");
|
||||||
stub = 1;
|
stub = 1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue