grischka
88a3ccab9f
allow tcc be build from separate objects
...
If you want that, run: make NOTALLINONE=1
2009-12-20 01:53:49 +01:00
grischka
7fa712e00c
win32: enable bounds checker & exception handler
...
exception handler borrowed from k1w1. Thanks.
2009-12-19 22:22:43 +01:00
grischka
8bbde91f62
tcc_relocate: revert to 0.9.24 behavior
2009-12-19 22:16:23 +01:00
grischka
3db219477a
tccrun: new file
...
factor out -run support
2009-12-19 22:16:22 +01:00
grischka
41e112360f
fix uninitialized warnings with 'type.ref'
2009-12-19 22:16:22 +01:00
grischka
3020a4765d
tccpe: with -l try also with "lib" prefix
...
-lfoo searches: foo.def, libfoo.def, foo.dll, libfoo.dll
2009-12-19 22:16:21 +01:00
grischka
94bf4d2c22
tccpe: improve dllimport
2009-12-19 22:16:21 +01:00
grischka
1308e8ebcf
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.
2009-12-19 22:16:20 +01:00
grischka
e81569bc70
tcc: add "-Wl,-rpath=path" option (library search path)
2009-12-19 22:16:20 +01:00
grischka
dd3d4f7295
x86-64: fix udiv, add cqto instruction
2009-12-19 22:16:19 +01:00
grischka
1445fea582
tccpe: allow linkage to extern symbols from asm
2009-12-19 22:16:18 +01:00
grischka
b5e2238483
tccasm: make VT_VOID symbols ST_NOTYPE, elf-wise
...
This was confusing objdump such that it did not print
disassembly with -d.
Also, put filename as with C compilation
2009-12-19 22:16:18 +01:00
grischka
ab4a4ab25e
x86-64: in gv(): ignore second register
2009-12-19 22:16:17 +01:00
grischka
d79b867d55
win64: adjust for two args with setjmp(buf,ctx)
2009-12-19 22:16:17 +01:00
grischka
e500c9118a
i386-asm: fix imul
...
With imul the 3rd operand defaults to the 2nd on. The previous
logic left 'op_type[2]' uninitialized which caused the bug to
show up only sometimes.
2009-12-06 17:41:22 +01:00
grischka
56d6abdb3d
tccgen: propagate alignment from typedef
...
Store (part of) the AttributeDef structure in the (int)sym-r
field of the typedef symbol (kludgy).
2009-12-06 17:37:33 +01:00
grischka
720a32ede4
win32: remove #define alloca from mingw headers
2009-12-01 17:58:39 +01:00
grischka
679f0794f8
win32: explain usage of mingw w32api package
2009-11-30 17:14:41 +01:00
grischka
a5279b2c05
tccpe: fclose FILE*
...
Reported by Martin Ettl (thanks)
2009-11-30 17:14:37 +01:00
grischka
a26bf10de3
win64: Use tcc's own assembler
...
Now that we have it thanks to Mr. Féret
2009-11-21 23:43:38 +01:00
grischka
50055880f9
asm 32/64: replace (long)sym->next by sym->jnext
2009-11-21 23:43:30 +01:00
grischka
1383055b17
x86_64: fix asm
2009-11-14 21:48:37 +01:00
grischka
0a3bcb57f6
fix 32bit asm
...
The new 16bit code was causing wrong 0x66 prefixes
in 32bit code.
The fix possibly breaks the feature on 16bit asm.
2009-11-14 20:05:22 +01:00
grischka
5b113f3ee3
win32: handle __declspec(dllimport)
2009-11-13 18:04:56 +01:00
grischka
dd70d19267
#define __TINYC__ = version-number
2009-11-13 17:11:52 +01:00
grischka
834b782a9c
tccpe: fill checksum header field
2009-08-24 13:30:02 +02:00
grischka
569c20f104
tccpp: fix quirk with cached headers and #else
...
Such as with
#ifndef FOO_H
...
#else
...
#endif
2009-08-24 13:30:01 +02:00
grischka
1026ca5888
fix "symbol not defined" if symbol has offset 0
2009-08-24 13:30:01 +02:00
grischka
d923e652f2
tccpp: avoid double free with macro_ptr_allocated (after errors)
2009-08-24 13:30:00 +02:00
grischka
0d34c2136e
tccgen: free inline functions correctly
2009-08-24 13:30:00 +02:00
grischka
697f9e305d
win64: fix bat
2009-08-24 13:28:02 +02:00
grischka
b08dfb8273
tcc: optionally build using libtcc
2009-07-18 22:08:01 +02:00
grischka
f88350b611
fix some warning
2009-07-18 22:07:51 +02:00
grischka
c998985c74
cleanup: constify some global data
2009-07-18 22:07:42 +02:00
grischka
94ae3984b0
tccpe: set tcc_lib_path from DLL
2009-07-18 22:07:33 +02:00
grischka
1df662c1b0
tccpe: load dll on the fly
2009-07-18 22:07:25 +02:00
grischka
9fda4f4248
win32: treat long double as double
2009-07-18 22:07:17 +02:00
grischka
97738d1ae9
win32: reformat examples, crt etc
2009-07-18 22:07:10 +02:00
grischka
bb5e0df79a
x86-64: fix load() for const pointers: (void*)-2
2009-07-18 22:07:03 +02:00
grischka
fc977d56c9
x86-64: chkstk, alloca
2009-07-18 22:06:54 +02:00
grischka
c0fc0fa0c4
win64: add x64 target to build-tcc.bat
2009-07-18 22:06:46 +02:00
grischka
dc251a7d8d
win64: use new headers from mingw
2009-07-18 22:06:37 +02:00
grischka
06aed3d171
win64: update tiny_impdef, tiny_libmaker (Elf64)
2009-07-18 22:06:14 +02:00
grischka
09ac9faf59
win64: align jmp_buf
2009-07-18 22:06:07 +02:00
grischka
035918ef2f
win64: fix pointer <-> unsigned long typecast issues
2009-07-18 22:05:58 +02:00
grischka
459875796b
pe32+ target: adjust x86_64-gen.c
...
- calling conventions are different:
* only 4 registers
* stack "scratch area" is always reserved
* doubles are mirrored in normal registers
- no GOT or PIC there
2009-07-18 22:05:49 +02:00
grischka
3ba1532cfb
pe32+ target: add to makefile
2009-07-18 22:05:40 +02:00
grischka
3ea4acb9b9
pe32+ target: add in various #define's
2009-07-18 22:05:27 +02:00
grischka
719ba918dd
tccpe: use more official structs
2009-07-18 21:55:32 +02:00
grischka
f366cb20fe
tccpe: support pe32+ (x86_64) target
2009-07-18 21:55:28 +02:00
grischka
fe8def3303
tccpe: use ElfW macros
2009-07-18 21:55:25 +02:00
grischka
dcfad3af49
tccpe: get rid of kludgy export-symbol sort
2009-07-18 21:55:20 +02:00
grischka
370cdeb628
tccpe: build IAT vector with with -run too
...
This prepares for x86_64 where we need the vector
for far jumps. Also, resolve DLL symbols in place
2009-07-18 21:55:15 +02:00
grischka
bed17847bd
cleanup: stop abuse of sym->c for #define tokenstreams
2009-07-18 21:55:10 +02:00
grischka
d0b432ab38
cleanup: stop abuse of sym->r for inline functions
2009-07-18 21:55:06 +02:00
grischka
5e83b64dae
cleanup: put prototypes in front of libtcc.c
2009-07-18 21:55:02 +02:00
grischka
85e481b66e
pp: return newline after directive
2009-07-18 21:54:58 +02:00
grischka
fcdb663dde
pp: simplify pasting, enable L ## number
2009-07-18 21:54:55 +02:00
grischka
045cff28fe
fix asmtest (somehow), update Makefiles
2009-07-18 21:54:51 +02:00
grischka
0085c648f6
bcheck: restore malloc hooks when done
2009-07-18 21:54:47 +02:00
grischka
c93ddac9aa
configure: support DESTDIR for RPM packagers etc.
...
Suggested by Shlomi Fish
2009-07-18 21:54:43 +02:00
grischka
ec4a350620
win32: guard va_list typedef
2009-06-17 02:11:40 +02:00
grischka
c4b7e77bbe
accept option -x <lang>
2009-06-17 02:11:27 +02:00
grischka
610fd47510
win32: structure return GCC compatible (ret 4 with cdecl)
2009-06-17 02:11:13 +02:00
grischka
ec54c34b9e
error messages: print "error: ..."
2009-06-17 02:10:56 +02:00
grischka
e4ae77c7bb
tcc_preprocess: add gcc-style include-depth flags
...
# 1 "main.c"
# 1 "include/stdio.h" 1
# 123 "include/stdio.h" 3
# 10 "main.c" 2
flags: 1: level++; 3: same-level 2: level--
2009-06-17 02:10:42 +02:00
grischka
956b4beec1
incompatible function ptr assignment: just warn
...
void fn_1(int i) {}
void (*fn_2)(char*) = fn_1;
2009-06-17 02:10:24 +02:00
grischka
6a004ed19f
allow redefinition of func_old_type functions
...
void *memcpy(void*, const void*, unsigned);
This gave an error if memcpy() has been used before
implicitely, e.g. for structure passing etc.
2009-06-17 02:09:52 +02:00
grischka
a342bbadc8
use static declaration from prototype
...
static int func();
...
int func() { }
As result, func needs to be static.
2009-06-17 02:09:20 +02:00
grischka
69fdb57edd
unions: initzialize only one field
...
struct {
union {
int a,b;
};
int c;
} sss = { 1,2 };
This had previously assigned 1,2 to a,b and 0 to c which is wrong.
2009-06-17 02:09:07 +02:00
grischka
bba515afe5
tccelf: accept BSS symbol with same name from other module
...
... such as 'int baz;' in two files at the same time
2009-06-17 02:08:54 +02:00
grischka
110a4edc15
drop alloca #define
...
(Because GNU's alloca.h unconditionally #undef's alloca)
Also, remove gcc specific sections in headers. and
instead change tests such that gcc does not use them.
2009-05-16 22:30:13 +02:00
grischka
68310299b6
ulibc: #define TCC_UCLIBC and load elf_interp
2009-05-16 22:29:40 +02:00
grischka
bf8d8f5f3e
update Changelog, bump version: 0.9.25
2009-05-11 19:01:26 +02:00
grischka
aed6a7cb60
fix "cached include" optimization
...
comparing the filenames as in the #include statement can be
ambiguous if including files are in different directories.
Now caches and checks the really opened filename instead.
2009-05-11 18:55:16 +02:00
grischka
ca4b4a52ad
fix build with msvc
2009-05-11 18:53:52 +02:00
grischka
03c787d6ce
fix unused/uninitalized warnings
2009-05-11 18:46:39 +02:00
grischka
40f5ce002e
fix warnings with tcc_add/get_symbol
2009-05-11 18:46:25 +02:00
grischka
67aebdd5b7
enable making tcc using libtcc
2009-05-11 18:46:02 +02:00
grischka
0a35f9d66e
move static prototypes to libtcc.c
2009-05-11 18:45:56 +02:00
grischka
f9181416f6
move some global variables into TCCState
2009-05-11 18:45:44 +02:00
grischka
5c6509578e
make tcc from tcc.c and libtcc from libtcc.c
2009-05-05 20:41:17 +02:00
grischka
b8f6e1ae30
move minor things from libtcc.c to other files
2009-05-05 20:30:39 +02:00
grischka
92204e8818
move global variables to libtcc.c
2009-05-05 20:30:13 +02:00
grischka
9dc9cbf319
move libtcc interface and helper functions to libtcc.c
2009-05-05 20:18:53 +02:00
grischka
0d1ed74102
move parser/generator to tccgen.c
2009-05-05 20:18:10 +02:00
grischka
805990b94e
move preprocessor to tccpp.c
2009-05-05 20:17:49 +02:00
grischka
ae37bd5abc
move declarations to tcc.h
2009-05-05 20:17:26 +02:00
grischka
a93bcdffae
new files: tcc.h libtcc.c tccpp.c tccgen.c
2009-05-05 20:17:11 +02:00
grischka
15626621fb
cleanup makefiles
2009-04-19 21:24:32 +02:00
grischka
e9e89ad699
enable backtrace only when it's supported
2009-04-18 18:39:27 +02:00
grischka
5829791ffa
fix makefiles etc for subdirs
2009-04-18 15:08:03 +02:00
grischka
ea5e81bd6a
new subdirs: include, lib, tests
2009-04-18 15:08:03 +02:00
grischka
e8a52a8249
win32: readme.txt->tcc-win32.txt, update tcc-doc
2009-04-18 15:08:03 +02:00
grischka
eca1fbaf92
mute strange difference in tcctest
2009-04-18 15:08:03 +02:00
grischka
b56f956247
libtcc: add support to be build as DLL
2009-04-18 15:08:03 +02:00
grischka
d165e87340
libtcc: new api tcc_set_lib_path
2009-04-18 15:08:03 +02:00
grischka
73ba078d2f
tcc_relocate: return error and remove unused code
2009-04-18 15:08:03 +02:00
grischka
dd5630ff95
tcc -E: fix pasting empty tokens
...
/* test case */
#define t(x,y,z) x ## y ## z
int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,),
t(10,,), t(,11,), t(,,12), t(,,) };
tcc -E: xpected result:
int j[] = { 123, 45, 67, 89,
10, 11, 12, };
2009-04-18 15:08:02 +02:00
grischka
0f0ed4a8bf
tcc -E: preserve spaces, alternative solution
...
/* test case */
#define STR(x) #x
#define MKSTR(x) STR(x)
MKSTR(-A-)
MKSTR(+ B +)
tcc -E: expected result:
"-A-"
"+ B +"
2009-04-18 15:08:02 +02:00