tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL) [PATCH]


From: Daniel Glöckner
Subject: Re: [Tinycc-devel] TCC on new ARM EABI (ARMEL) [PATCH]
Date: Tue, 12 Sep 2006 03:23:20 +0200
User-agent: Mutt/1.4.2.1i

Attached is a patch that modifies current cvs to allow it to compile
itself on Linux ARM EABI.

Things I changed:
1. switched from FPA to VFP FPU.
2. made shure the stack is alignend to 8 for doubles, long longs and
   subroutine calls
3. structures < 4 bytes are returned in R0
4. floating point values are returned in R0/R1
5. switched to ARM run-time ABI function names
6. make use of memcpy4/memcpy8 on when struct alignment permits
7. made tcc load SHT_ARM_EXIDX sections (else SIGSEGV because of
   relocations there)
8. added some relocation types
9. changed elf interpreter to /lib/ld-linux.so.3
10. set elf header to ARM EABI ver. 4

EABI unrelated changes:
11. register FP now points to the first parameter
12. revised FPA comparision conditions
13. added run-time check to store FPA (long) doubles in correct word
    order on cross compilation
14. fixed bug in ARM non-EABI double/long long alignment introduced by
    c67 target

I also made enums EABI compliant by changing VT_ENUM into a flag and
setting the basetype according to the enum values. But when I saw that
GCC behaves non-conforming, I undid that change.

ARM EABI is enabled by compiling TCC with -DTCC_ARM_EABI in addition to
-DTCC_TARGET_ARM. VFP can be enabled independently by compiling with
-DTCC_ARM_VFP.

Apart from compiling tcc with tcc and comparing the binary to tcc
compiled with tcc compiled with tcc in QEMU, there is no testing.

I had to use -fno-common when I wanted to link tcc object files with
gcc. Else static uninitialized variables are placed starting from NULL.

I hope I didn't break non-EABI ARM.

Btw.:
ln -s /lib/libgcc_s.so.1 /usr/lib/tcc/libtcc1.a
is sufficient for most programs.

  Daniel

Attachment: aeabi.diff.gz
Description: application/gunzip

Attachment: pgpe6pV8KmXN2.pgp
Description: PGP signature


reply via email to

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