grischka
3aa26a794e
win32: adjust for mingw32 winapi packages
...
Note: the files in tcc/win32/include/winapi are now from the
mingw-w64 project, however with this fix using mingw32 winapi
should still work.
2010-01-26 22:18:03 +01:00
grischka
a40814cc9d
tccpp: signal missing #endif error
2010-01-14 21:00:05 +01:00
grischka
4e5170d4a5
tccpp: convert TOK_GET macro into function
2010-01-14 20:59:44 +01:00
grischka
280e20b1d3
tccpp: warn about #define redefinition
2010-01-14 20:59:44 +01:00
grischka
e20bf69ac5
win64: defined size_t and ptrdiff_t to unsigned long long
2010-01-14 20:59:43 +01:00
grischka
b0abcfde9d
win32: cleanup include
2010-01-14 20:59:43 +01:00
grischka
5299142286
x86-64: use uplong for symbol values
2010-01-14 20:59:42 +01:00
grischka
2341ee5142
tccpe: improve dllimport/export and use for tcc_add_symbol
2010-01-14 20:59:42 +01:00
grischka
bdb9387a74
win32: readme: add libtcc_test example
2010-01-14 20:59:41 +01:00
grischka
903b6001e7
update Makefiles
2009-12-20 20:34:35 +01:00
grischka
0de95730ad
build from multiple objects: fix other targets
2009-12-20 20:33:41 +01:00
grischka
b54862406e
x86-64: fix gtst, back to only 5 regs for now
2009-12-20 20:33:21 +01:00
grischka
070b86a870
x86-64: use r8/r9 as generic integer registers
2009-12-20 02:19:51 +01:00
grischka
0e5c0ee045
x86-64: use r8,r9 as load/store registers
2009-12-20 01:54:39 +01:00
grischka
cda8c41ef3
win32: add size_t to _mingw.h
2009-12-20 01:54:38 +01:00
grischka
4a01eb09d8
use vpushv in some places
2009-12-20 01:54:38 +01:00
grischka
50b040ef83
win64: add tiny unwind data for setjmp/longjmp
...
This enables native unwind semantics with longjmp on
win64 by putting an entry into the .pdata section for
each compiled fuction.
Also, the function now use a fixed stack and store arguments
into X(%rsp) rather than using push.
2009-12-20 01:54:37 +01:00
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