diff options
| author | Shinichiro Hamaji <shinichiro.hamaji _at_ gmail.com> | 2008-12-02 03:19:25 +0900 |
|---|---|---|
| committer | grischka <grischka> | 2008-12-02 02:30:47 +0100 |
| commit | 0a9873aa22731077fad295a4aad2fc1f390c8ac7 (patch) | |
| tree | 95294fbf05ff654ad927276a72dd4f0779a9bba2 /configure | |
| parent | fb0ac27691c1a027d3322c2e1d2d0876163314a1 (diff) | |
| download | tinycc-0a9873aa22731077fad295a4aad2fc1f390c8ac7.tar.gz tinycc-0a9873aa22731077fad295a4aad2fc1f390c8ac7.tar.bz2 | |
Add support of x86-64.
Most change was done in #ifdef TCC_TARGET_X86_64. So, nothing should be broken by this change.
Summary of current status of x86-64 support:
- produces x86-64 object files and executables.
- the x86-64 code generator is based on x86's.
-- for long long integers, we use 64bit registers instead of tcc's generic implementation.
-- for float or double, we use SSE. SSE registers are not utilized well (we only use xmm0 and xmm1).
-- for long double, we use x87 FPU.
- passes make test.
- passes ./libtcc_test.
- can compile tcc.c. The compiled tcc can compile tcc.c, too. (there should be some bugs since the binary size of tcc2 and tcc3 is differ where tcc tcc.c -o tcc2 and tcc2 tcc.c -o tcc3)
- can compile links browser. It seems working.
- not tested well. I tested this work only on my linux box with few programs.
- calling convention of long-double-integer or struct is not exactly the same as GCC's x86-64 ABI.
- implementation of tcc -run is naive (tcc -run tcctest.c works, but tcc -run tcc.c doesn't work). Relocating 64bit addresses seems to be not as simple as 32bit environments.
- shared object support isn't unimplemented
- no bounds checker support
- some builtin functions such as __divdi3 aren't supported
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -39,6 +39,9 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="x86" ;; + x86_64) + cpu="x86-64" + ;; armv4l) cpu="armv4l" ;; @@ -313,6 +316,9 @@ echo "EXESUF=$EXESUF" >> config.mak if test "$cpu" = "x86" ; then echo "ARCH=i386" >> config.mak echo "#define HOST_I386 1" >> $TMPH +elif test "$cpu" = "x86-64" ; then + echo "ARCH=x86-64" >> config.mak + echo "#define HOST_X86_64 1" >> $TMPH elif test "$cpu" = "armv4l" ; then echo "ARCH=arm" >> config.mak echo "#define HOST_ARM 1" >> $TMPH |
