integrate x86_64-asm.c into i386-asm.c

Also, disable 16bit support for now as it causes bugs
in 32bit mode.  #define I386_ASM_16 if you want it.
This commit is contained in:
grischka
2009-12-19 22:08:37 +01:00
parent e81569bc70
commit 1308e8ebcf
12 changed files with 526 additions and 1847 deletions

View File

@ -3,8 +3,6 @@
@rem ----------------------------------------------------
@set PROMPT=$G$S
copy ..\include\*.h include
echo>..\config.h #define TCC_VERSION "0.9.25"
echo>>..\config.h #define TCC_TARGET_PE 1
echo>>..\config.h #define CONFIG_TCCDIR "."
@ -27,7 +25,6 @@ echo>>..\config.h #define TCC_TARGET_X86_64 1
:libtcc
if not exist libtcc\nul mkdir libtcc
copy ..\libtcc.h libtcc\libtcc.h
%P%gcc -Os -fno-strict-aliasing ../libtcc.c -c -o libtcc.o
%P%ar rcs libtcc/libtcc.a libtcc.o
@ -35,24 +32,13 @@ copy ..\libtcc.h libtcc\libtcc.h
%P%gcc -Os -fno-strict-aliasing ../tcc.c -o tcc.exe -s -DTCC_USE_LIBTCC -ltcc -Llibtcc
:libtcc1.a
copy ..\include\*.h include
.\tcc -c lib/crt1.c
.\tcc -c lib/wincrt1.c
.\tcc -c lib/dllcrt1.c
.\tcc -c lib/dllmain.c
.\tcc -c ../lib/libtcc1.c
@rem if not x%P%==x goto use_yasm
.\tcc -c lib/chkstk.S
.\tcc -c ../lib/alloca86%S%.S
tiny_libmaker lib/libtcc1.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86%S%.o
@goto cleanup
:use_yasm
.\tcc -o tmp.s -E lib/chkstk.S
yasm -p gnu -f elf64 -o chkstk.o tmp.s
.\tcc -o tmp.s -E ../lib/alloca86_64.S
yasm -p gnu -f elf64 -o alloca86_64.o tmp.s
del tmp.s
tiny_libmaker lib/libtcc1.a crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o libtcc1.o alloca86_64.o
:cleanup
del *.o