[Top][All Lists]

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

Re: [Tinycc-devel] libtcc1 on ARM now contains runtime functions

From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] libtcc1 on ARM now contains runtime functions
Date: Sat, 14 Dec 2013 23:15:39 +0800
User-agent: KMail/4.11.3 (Linux/2.6.38-ac2-ac100; KDE/4.11.3; armv7l; ; )

Le samedi 14 décembre 2013, 19:32:42 Thomas Preud'homme a écrit :
> Le samedi 14 décembre 2013, 08:19:15 Christian Jullien a écrit :
> > Hi Thomas,
> > 
> > I this morning I decided to test your new runtime functions on my beloved
> > RPi.
> > As usual, I've made a fresh install:
> > 
> > And tried to compile using only "./configure; make"
> > 
> > Then, I got:
> > ------------ test3 ------------
> > ../tcc -B.. -I.. -I.. -I../include -DCONFIG_LDDIR="\"lib\""
> > -DCONFIG_MULTIARCHDIR="\"arm-linux-gnueabihf\"" -DTCC_TARGET_ARM
> > ../tcc.c
> > -B.. -I.. -I.. -I../include -DCONFIG_LDDIR="\"lib\""
> > -DCONFIG_MULTIARCHDIR="\"arm-linux-gnueabihf\"" -DTCC_TARGET_ARM
> > ../tcc.c
> > -B.. -I.. -I.. -I../include -DCONFIG_LDDIR="\"lib\""
> > -DCONFIG_MULTIARCHDIR="\"arm-linux-gnueabihf\"" -DTCC_TARGET_ARM
> > ../tcc.c
> > -B.. -I.. -I.. -I../include -run ../tests/tcctest.c > test.out3
> > In file included from ../tcc.c:22:
> > In file included from ../libtcc.c:21:
> > In file included from ../tcc.h:32:
> > In file included from /usr/include/stdlib.h:43:
> > In file included from
> > /usr/include/arm-linux-gnueabihf/bits/waitstatus.h:65: In file included
> > from /usr/include/endian.h:61:
> > /usr/include/arm-linux-gnueabihf/bits/byteswap.h:40: error: FIXME:
> > function
> > bigger than 32MB
> Yes I get that too. The test work when compiled and launched though which
> was not the case before. So it's an improvement. I know what does this
> error mean but I'm wondering why I get the bug with libtcc and not libgcc.
> Maybe it's due to the size of the library. I could fix this peculiar bug in
> gjmp but this error happens in encbranch (called from gjmp among others)
> and a fix in gjmp would thus be a partial fix. And fixing it in encbranch
> would change its semantic (it would output instruction instead of just an
> offset).

No need to handle this case, it was a bug in the division for signed integer 
which led to incorrect result when doing the /=4 in encbranch.

I also discovered that if (value) doesn't work if value is a long long. I was 
relying on this so I changed my code to do it differently (and more sanely to 
be honest). Anyway, that's a new bug that ought to be fixed.

int main(void)
        long long ll = -18;
        if (ll & LLONG_MIN)
        return 0;

This code displays ok when compiled with gcc but ko when compiled with tcc.

So now I get a relocation error, maybe still a division error. I'll 

Best regards,


reply via email to

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