2018-06-19 18:29:25 +00:00
|
|
|
/* -*-comment-start: "//";comment-end:""-*-
|
2018-07-22 12:24:36 +00:00
|
|
|
* GNU Mes --- Maxwell Equations of Software
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
* Copyright © 2017,2018,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
2021-02-08 18:31:53 +00:00
|
|
|
* Copyright © 2021 Danny Milosavljevic <dannym@scratchpost.org>
|
2018-06-19 18:29:25 +00:00
|
|
|
*
|
2018-07-22 12:24:36 +00:00
|
|
|
* This file is part of GNU Mes.
|
2018-06-19 18:29:25 +00:00
|
|
|
*
|
2018-07-22 12:24:36 +00:00
|
|
|
* GNU Mes is free software; you can redistribute it and/or modify it
|
2018-06-19 18:29:25 +00:00
|
|
|
* under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
2018-07-22 12:24:36 +00:00
|
|
|
* GNU Mes is distributed in the hope that it will be useful, but
|
2018-06-19 18:29:25 +00:00
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-22 12:24:36 +00:00
|
|
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
2018-06-19 18:29:25 +00:00
|
|
|
*/
|
|
|
|
|
2019-05-07 22:25:41 +00:00
|
|
|
#include <mes/lib.h>
|
2018-07-21 09:15:48 +00:00
|
|
|
|
2021-02-08 18:31:53 +00:00
|
|
|
#if HAVE_LONG_LONG
|
|
|
|
long long
|
|
|
|
__divdi3 (long long a, long long b)
|
|
|
|
#else
|
|
|
|
long
|
|
|
|
__divdi3 (long a, long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__divdi3 stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2021-02-08 18:31:53 +00:00
|
|
|
// FIXME: Actually use long long
|
2020-12-12 22:57:58 +00:00
|
|
|
long ai = a;
|
|
|
|
long bi = b;
|
|
|
|
#if __arm__ && __TINYC__
|
|
|
|
return __mesabi_idiv (ai, bi);
|
|
|
|
#else
|
|
|
|
return ai / bi;
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2021-02-08 18:31:53 +00:00
|
|
|
#if HAVE_LONG_LONG
|
|
|
|
long long
|
|
|
|
__moddi3 (long long a, long long b)
|
|
|
|
#else
|
|
|
|
long
|
|
|
|
__moddi3 (long a, long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__moddi3 stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2021-02-08 18:31:53 +00:00
|
|
|
// FIXME: Actually use long long
|
2020-12-12 22:57:58 +00:00
|
|
|
long ai = a;
|
|
|
|
long bi = b;
|
|
|
|
#if __arm__ && __TINYC__
|
|
|
|
return __mesabi_imod (ai, bi);
|
|
|
|
#else
|
|
|
|
return ai % bi;
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
unsigned long long
|
|
|
|
__udivdi3 (unsigned long long a, unsigned long long b)
|
2019-07-23 18:38:29 +00:00
|
|
|
#else
|
|
|
|
unsigned long
|
|
|
|
__udivdi3 (unsigned long a, long ah, unsigned long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__udivdi3 stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2021-02-08 18:31:53 +00:00
|
|
|
// FIXME: Actually use long long
|
2019-07-23 18:38:29 +00:00
|
|
|
unsigned long ai = a;
|
|
|
|
unsigned long bi = b;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
if (!b)
|
|
|
|
return 0;
|
2020-12-12 22:57:58 +00:00
|
|
|
#if __arm__ && __TINYC__
|
2021-02-08 18:31:53 +00:00
|
|
|
return __mesabi_udiv (ai, bi);
|
2020-12-12 22:57:58 +00:00
|
|
|
#else
|
2018-06-19 18:29:25 +00:00
|
|
|
return ai / bi;
|
2020-12-12 22:57:58 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
unsigned long long
|
|
|
|
__umoddi3 (unsigned long long a, unsigned long long b)
|
2019-07-23 18:38:29 +00:00
|
|
|
#else
|
|
|
|
unsigned long
|
|
|
|
__umoddi3 (unsigned long a, long ah, unsigned long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__umoddi3 stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2021-02-08 18:31:53 +00:00
|
|
|
// FIXME: Actually use long long
|
2019-07-23 18:38:29 +00:00
|
|
|
unsigned long ai = a;
|
|
|
|
unsigned long bi = b;
|
2020-12-12 22:57:58 +00:00
|
|
|
#if __arm__ && __TINYC__
|
2021-02-08 18:31:53 +00:00
|
|
|
return __mesabi_umod (ai, bi);
|
2020-12-12 22:57:58 +00:00
|
|
|
#else
|
2018-06-19 18:29:25 +00:00
|
|
|
return ai % bi;
|
2020-12-12 22:57:58 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
unsigned long long
|
2019-07-23 18:38:29 +00:00
|
|
|
__lshrdi3 (unsigned long long a, long b)
|
|
|
|
#else
|
|
|
|
unsigned long
|
|
|
|
__lshrdi3 (unsigned long a, long ah, long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__lshrdi3 stub\n");
|
|
|
|
stub = 1;
|
|
|
|
return a >> b;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#else // __TINYC__
|
2019-07-23 18:38:29 +00:00
|
|
|
for (int i = 0; i < b; i++)
|
2020-12-12 22:57:58 +00:00
|
|
|
#if __arm__
|
2021-02-08 18:31:53 +00:00
|
|
|
a = __mesabi_udiv (a, 2); // I sure hope that doesn't endless recurse because of the optimizations in __mesabi_udiv that shift
|
2020-12-12 22:57:58 +00:00
|
|
|
#else // !__arm__
|
2019-07-23 18:38:29 +00:00
|
|
|
a /= 2;
|
2020-12-12 22:57:58 +00:00
|
|
|
#endif // !__arm__
|
|
|
|
return a;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif // __TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
long long
|
2019-07-23 18:38:29 +00:00
|
|
|
__ashldi3 (long long a, long b)
|
|
|
|
#else
|
|
|
|
long
|
|
|
|
__ashldi3 (long a, long ah, long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__ashldi3 stub\n");
|
|
|
|
stub = 1;
|
|
|
|
return a << b;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#else // __TINYC__
|
2019-07-23 18:38:29 +00:00
|
|
|
for (int i = 0; i < b; i++)
|
|
|
|
a += a;
|
|
|
|
return a;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif // __TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
long long
|
2019-07-23 18:38:29 +00:00
|
|
|
__ashrdi3 (long long a, long b)
|
|
|
|
#else
|
|
|
|
long
|
|
|
|
__ashrdi3 (long a, long ah, long b)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__ashrdi3 stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
return a >> b;
|
|
|
|
#else // __TINYC__
|
2019-07-23 18:38:29 +00:00
|
|
|
for (int i = 0; i < b; i++)
|
2020-12-12 22:57:58 +00:00
|
|
|
#if __arm__
|
2021-02-08 18:31:53 +00:00
|
|
|
a = __mesabi_idiv (a, 2); // I sure hope that doesn't endless recurse because of the optimizations in __mesabi_udiv that shift
|
2020-12-12 22:57:58 +00:00
|
|
|
#else // !__arm__
|
2019-07-23 18:38:29 +00:00
|
|
|
a /= 2;
|
2020-12-12 22:57:58 +00:00
|
|
|
#endif // !__arm__
|
2019-07-23 18:38:29 +00:00
|
|
|
return a;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif // __TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
}
|
|
|
|
|
2020-12-16 11:31:41 +00:00
|
|
|
#if HAVE_FLOAT_STUB || HAVE_FLOAT
|
2020-12-12 23:01:44 +00:00
|
|
|
double
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2020-12-12 23:01:44 +00:00
|
|
|
#if HAVE_LONG_LONG && HAVE_FLOAT
|
|
|
|
__floatundidf (unsigned long long a)
|
|
|
|
#else
|
|
|
|
__floatundidf (unsigned long a)
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
#if !__TINYC__
|
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__floatundidf stub\n");
|
|
|
|
stub = 1;
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG && HAVE_FLOAT
|
2018-06-19 18:29:25 +00:00
|
|
|
long double
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2018-06-19 18:29:25 +00:00
|
|
|
__floatundixf (unsigned long long a)
|
2019-07-23 18:38:29 +00:00
|
|
|
#else
|
|
|
|
double
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2019-07-23 18:38:29 +00:00
|
|
|
__floatundixf (unsigned long a)
|
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__floatundixf stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
unsigned long long
|
2019-07-23 18:38:29 +00:00
|
|
|
#else
|
|
|
|
unsigned long
|
|
|
|
#endif
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2018-06-19 18:29:25 +00:00
|
|
|
__fixunsxfdi (double a1)
|
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__fixunsxfdi stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-06-24 07:28:23 +00:00
|
|
|
#if __TINYC__ == 9226
|
|
|
|
long
|
2018-07-21 09:15:48 +00:00
|
|
|
#elif __TINYC__
|
2018-06-24 07:28:23 +00:00
|
|
|
int
|
2019-07-23 18:38:29 +00:00
|
|
|
#else // !__TINYCC__
|
2018-07-21 09:15:48 +00:00
|
|
|
long long
|
2019-07-23 18:38:29 +00:00
|
|
|
#endif // !__TINYCC__
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2018-06-19 18:29:25 +00:00
|
|
|
__fixdfdi (double a1)
|
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__fixdfdi stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-19 18:29:25 +00:00
|
|
|
unsigned long long
|
2019-07-23 18:38:29 +00:00
|
|
|
#else
|
|
|
|
unsigned long
|
|
|
|
#endif
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
|
|
|
__fixxfdi (double a1)
|
2018-06-19 18:29:25 +00:00
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__fixxfdi stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-07-23 18:38:29 +00:00
|
|
|
#if HAVE_LONG_LONG
|
2018-06-24 07:28:23 +00:00
|
|
|
long long
|
2019-07-23 18:38:29 +00:00
|
|
|
#else
|
|
|
|
long
|
|
|
|
#endif
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2018-06-19 18:29:25 +00:00
|
|
|
__fixsfdi (double a1)
|
|
|
|
{
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#if !__TINYC__
|
2018-06-19 18:29:25 +00:00
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__fixsfdi stub\n");
|
|
|
|
stub = 1;
|
libtcc1: Remove mesabi dependencies for TinyCC.
* lib/libtcc1.c (__divdi3, __moddi3, __udivdi3, __umoddi3, __lshrdi3,
__ashldi3, __ashrdi3, __floatundixf, __fixunsxfdi, __fixxfdi,
__fixsfdi)[__TINYC__]: No stub printing.
2020-12-12 22:53:03 +00:00
|
|
|
#endif
|
2018-06-19 18:29:25 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2020-12-12 23:01:44 +00:00
|
|
|
|
|
|
|
double
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2020-12-12 23:01:44 +00:00
|
|
|
__fixunsdfdi (double num, double den)
|
|
|
|
{
|
|
|
|
#if !__TINYC__
|
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__fixunsdfdi stub\n");
|
|
|
|
stub = 1;
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
2020-12-16 11:31:41 +00:00
|
|
|
#endif // HAVE_FLOAT_STUB || HAVE_FLOAT
|
2020-12-12 23:01:44 +00:00
|
|
|
|
|
|
|
int
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2020-12-12 23:01:44 +00:00
|
|
|
__fixunsdfsi (int a, int b)
|
|
|
|
{
|
|
|
|
#if !__TINYC__
|
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__fixunsdfsi stub\n");
|
|
|
|
stub = 1;
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-12-12 23:06:18 +00:00
|
|
|
#if __arm__
|
|
|
|
int
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2020-12-12 23:06:18 +00:00
|
|
|
__floatdisf (int a, int b)
|
|
|
|
{
|
|
|
|
#if !__TINYC__
|
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__floatdisf stub\n");
|
|
|
|
stub = 1;
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2020-12-13 08:43:20 +00:00
|
|
|
__attribute__((weak))
|
2020-12-12 23:06:18 +00:00
|
|
|
__floatdidf (int a, int b)
|
|
|
|
{
|
|
|
|
#if !__TINYC__
|
|
|
|
static int stub = 0;
|
|
|
|
if (__mes_debug () && !stub)
|
|
|
|
eputs ("__floatdidf stub\n");
|
|
|
|
stub = 1;
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-12-12 23:07:10 +00:00
|
|
|
int
|
|
|
|
__divsi3 (int num, int den)
|
|
|
|
{
|
|
|
|
return __mesabi_idiv (num, den);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
__modsi3 (int num, int den)
|
|
|
|
{
|
|
|
|
return __mesabi_imod (num, den);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
__udivsi3 (int num, int den)
|
|
|
|
{
|
|
|
|
return __mesabi_udiv (num, den);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
__umodsi3 (int num, int den)
|
|
|
|
{
|
|
|
|
return __mesabi_umod (num, den);
|
|
|
|
}
|
2020-12-12 23:06:18 +00:00
|
|
|
#endif //__arm__
|