aboutsummaryrefslogtreecommitdiff
path: root/libtcc1.c
diff options
context:
space:
mode:
authorDaniel Glöckner <daniel-gl@gmx.net>2008-09-05 21:07:46 +0200
committergrischka <grischka>2008-09-12 22:22:36 +0200
commit12265da6cd24bd48ce6e40b60fac1dc62eeee156 (patch)
treed181cedfa63eb65d06aa2ad3a78129a8ecc898f4 /libtcc1.c
parent2c657f6608fd192e785d5b2eed2594007777842b (diff)
downloadtinycc-12265da6cd24bd48ce6e40b60fac1dc62eeee156.tar.gz
tinycc-12265da6cd24bd48ce6e40b60fac1dc62eeee156.tar.bz2
Runtime lib functions
Yesterday I felt the urge to change a few things in TinyCC. This is the first and biggest change of all of them. - use __aeabi_*divmod functions in ARM EABI to make binaries depend solely on standardized library functions - refactor ARM floating point <-> integer conversion a bit - rename long long->float and shift library functions to correspond to the names used by GCC - compile more tokens conditionally to reduce the size of TinyCC The intention is primarily to allow users of the ARM target to use libgcc (which is usually available as a shared library) instead of libtcc1 (which can't be compiled for ARM due to lack of an inline assembler). Changing the EABI target to use the divmod functions in theory allows to use it without libtcc1 on any (not necessarily GCC based) ARM EABI system. Daniel
Diffstat (limited to 'libtcc1.c')
-rw-r--r--libtcc1.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libtcc1.c b/libtcc1.c
index 11393e3..892baba 100644
--- a/libtcc1.c
+++ b/libtcc1.c
@@ -419,7 +419,7 @@ unsigned long long __umoddi3(unsigned long long u, unsigned long long v)
}
/* XXX: fix tcc's code generator to do this instead */
-long long __sardi3(long long a, int b)
+long long __ashrdi3(long long a, int b)
{
#ifdef __TINYC__
DWunion u;
@@ -438,7 +438,7 @@ long long __sardi3(long long a, int b)
}
/* XXX: fix tcc's code generator to do this instead */
-unsigned long long __shrdi3(unsigned long long a, int b)
+unsigned long long __lshrdi3(unsigned long long a, int b)
{
#ifdef __TINYC__
DWunion u;
@@ -457,7 +457,7 @@ unsigned long long __shrdi3(unsigned long long a, int b)
}
/* XXX: fix tcc's code generator to do this instead */
-long long __shldi3(long long a, int b)
+long long __ashldi3(long long a, int b)
{
#ifdef __TINYC__
DWunion u;
@@ -483,7 +483,7 @@ unsigned short __tcc_int_fpu_control = 0x137f | 0x0c00;
#endif
/* XXX: fix tcc's code generator to do this instead */
-float __ulltof(unsigned long long a)
+float __floatundisf(unsigned long long a)
{
DWunion uu;
XFtype r;
@@ -498,7 +498,7 @@ float __ulltof(unsigned long long a)
}
}
-double __ulltod(unsigned long long a)
+double __floatundidf(unsigned long long a)
{
DWunion uu;
XFtype r;
@@ -513,7 +513,7 @@ double __ulltod(unsigned long long a)
}
}
-long double __ulltold(unsigned long long a)
+long double __floatundixf(unsigned long long a)
{
DWunion uu;
XFtype r;