tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Undefined symbol '__ashldi3'


From: Michael Matz
Subject: Re: [Tinycc-devel] Undefined symbol '__ashldi3'
Date: Fri, 8 Mar 2019 14:03:03 +0000 (UTC)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hi,

On Fri, 8 Mar 2019, Andy Goth wrote:

> On Fri, Mar 8, 2019, 00:46 Andy Goth <address@hidden> wrote:
> 
> > With tcc4tcl 0.30 (tcc 0.9.26) compiled with MXE GCC 5.4.0, I get the
> > following error:
> >
> 
> I left out a critical detail. This is 32-bit Windows MXE GCC. I haven't
> tried 64-bit Windows yet, but it works fine in both 32- and 64-bit Linux.

Yes, only 32bit code emits calls to this function, on both Windows and 
Linux.  The function is defined in either libgcc.a or libtcc1.a which 
TCC automatically should link against (either of them).  Somehow this is 
not happening, I can't say why, you'll have to figure it out.

Alternatively, if there are reasons why you don't link against libtcc1.a 
or libgcc.a you will have to provide an implementation of this function 
yourself, you could look into lib/libtcc1.c source for that.

There are other helper functions that TCC might also generate calls for
in the i386 backend:

__divdi3   long ret,x,y;  ret = x / y;
__udivdi3  ulong ret,x,y; ret = x / y;
__moddi3   long ret,x,y;  ret = x % y;
__umoddi3  ulong ret,x,y; ret = x % y;
__ashrdi3  long ret,x,y;  ret = x >> y;
__lshrdi3  ulong ret,x,y; ret = x >> y;
__floatundisf   ulong -> float
__floatundidf   ulong -> double
__floatundixf   ulong -> long double
__fixunssfdi    float -> ulong
__fixunsdfdi    double -> ulong
__fixunsxfdi    long double -> ulong
__fixsfdi       float -> long
__fixdfdi       double -> long
__fixxfdi       long double -> long

So it's probably easier to just figure out why libtcc1.a isn't linked 
automatically with your program.


Ciao,
Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]