aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Force const. expr. in expr_cond outside functionThomas Preud'homme2011-07-311-1/+1
| | | | | | Since no code should be generated outside a function, force expr_cond to only consider constant expression when outside a function since the generic code can generate some code.
* fixed Makefile test targetsJoe Soroka2011-07-222-2/+2
|
* re-added negative-array-size testcase and fixed fix for itJoe Soroka2011-07-222-3/+5
|
* Revert "better constant handling for expr_cond"grischka2011-07-162-6/+1
| | | | | It produced wrong code with one of my test projects. This reverts commit cd3d1a45f34be3c9a358f1743bcaf8aac897992e.
* elf.h: define SHF_MERGE etc.grischka2011-07-141-0/+11
|
* win64: va_arg with structuresgrischka2011-07-143-41/+51
|
* tccpe: cleanup ELFW() macros etc.grischka2011-07-145-59/+44
|
* tccrun: win32: improve exception handlergrischka2011-07-141-28/+29
|
* tccrun: win32: improve rt_get_caller_pcgrischka2011-07-141-18/+13
|
* tccrun: rt_printline: fix no-stabs casegrischka2011-07-141-10/+23
|
* tccrun: improve rt_printline output formatgrischka2011-07-141-16/+18
| | | | | Prefix line with "file:linenumber:" such that editors can easily jump to the source location
* tccrun: win64: add unwind function table for dynamic codegrischka2011-07-146-53/+79
| | | | | This works only when tcc.exe is compiled using MSC. MinGW does something in the startup code that defeats it.
* tccgen: reset aligned attribute for next typegrischka2011-07-141-0/+1
| | | | | | | | | | | | Basically, with: typedef __attribute__((aligned(16))) struct _xyz { ... } xyz, *pxyz; we want the struct aligned but not the pointer. FIXME: This patch is a hack, waiting for someone in the knowledge of correct __attribute__ semantics.
* make: create native tcc from separate objectsgrischka2011-07-147-17/+18
| | | | | | | | | | | | | | | | | | | | | | | This was already possible using make NOTALLINONE=1 and is now the default. To build as previously from one big source, use make ONE_SOURCE=1 Cross compilers are still build from one source because using separate objects requires separate build directories one per platform which currently is not (yet) supported by the makefile. We could probably use gnu-makeish target variables like $(I386_CROSS): OUTDIR=build/i386 $(X64_CROSS): OUTDIR=build/x86-64 and so on ... Also NEED_FLOAT_TYPES for arm-gen is removed. It was about variables that are referenced from outside (libtcc, tccgen). We could declare them in tcc.h (as with reg_classes) or have them twice in arm-gen.c. I chose option 2.
* Fix array_test: move params to local varsThomas Preud'homme2011-07-121-2/+2
| | | | | | | | | | array_test is declared and called with no parameters but defined with one parameter. Compilation succeed (definition is after the use so the compiler consider the declaration) as well as link (the function exist and has the right name) but running the test segfault on i386 platforms. This patch moves the parameter to local variable. If the intention was to call it with an array parameter then feel free to fix it again.
* win32: add -Wl,--stack=xxx switchgrischka2011-07-113-6/+7
| | | | | | | | For example: $ tcc -Wl,--stack=4194309 which means 4 MB. Default is 1 MB.
* win32/include: enable _timezone etc variables.grischka2011-07-113-15/+13
| | | | | | | | | which live in msvcrt.dll and need __declspec(import) which works by now. Also: - _mingw.h: conditionally define WIN32_LEAN_AND_MEAN - malloc.h: don't undef alloca
* allow defining sysroot at compile-timeJoe Soroka2011-07-111-0/+2
|
* handle arrays with a flexible member but no initializerJoe Soroka2011-07-112-2/+4
|
* better constant handling for expr_condJoe Soroka2011-07-112-1/+6
|
* fix self-referential token pastingJoe Soroka2011-07-082-2/+20
|
* Use CONFIG_TCC_LDDIR for ld.so on all linux archsThomas Preud'homme2011-07-081-4/+4
|
* Fix problem spotted in <4E15F966.4090102@gmx.de>Thomas Preud'homme2011-07-081-35/+33
| | | | | | | | * Rename tcc_split_path_components * Move tcc_split_path below memory wrapper section * Ident tcc_split_path by 4 * Remove prefix and suffix clutter in tcc_split_path * Don't dereference beyond the end of the search paths string
* fix end-of-scope for self-referential macrosJoe Soroka2011-07-082-2/+3
|
* Remove useless changes from 31ca000d in configureThomas Preud'homme2011-07-071-31/+15
| | | | | After commit 4d6a4a26e08ef8581c70d29f578a42ab7d738c2d, the changes in configure are no longer needed.
* Make ex1.c and ex4.c be executable on any systemsThomas Preud'homme2011-07-072-2/+2
| | | | | Use /usr/bin/env to make ex1.c and ex4.c on any systems, wherever is installed tcc.
* Document in README that ex4.c can be executed.Thomas Preud'homme2011-07-071-1/+2
|
* Revert "Make examples' shebang use target tcc bindir path"Thomas Preud'homme2011-07-074-14/+7
| | | | This reverts commit cb2138f8b098feb1b51a407343a4b99e25d5b506.
* Add configuration of include subdirectoriesThomas Preud'homme2011-07-072-2/+20
| | | | | | | | Add the possibility to search headers in several subdirectories of /usr/local/include and /usr/include. A possible use case would be for tcc to search for headers in /usr/local/include/x86_64-linux-gnu, /usr/local/include, /usr/include/x86_64-linux-gnu and /usr/include in turn.
* Introduce tcc_split_path_component for 31ca000dThomas Preud'homme2011-07-071-20/+41
| | | | | Rewrite code introduced by 31ca000d and following commits around a new function tcc_split_path_component.
* Free extra_libdir_str after use.Thomas Preud'homme2011-07-061-0/+1
|
* Fix commit 31ca000dThomas Preud'homme2011-07-051-3/+7
| | | | | * CONFIG_TCC_*LDDIR should not be exported if no --*lddir option is used. * Don't write a : at the beginning of extralddir
* Add multiarch dirs to linker search pathThomas Preud'homme2011-07-053-21/+58
| | | | | | | | | | | By default, tcc search libraries in /lib and /usr/local/lib while crt*.o files are searched in /usr/lib and ld.so is searched in /lib. Unfortunetely the path are hardcoded in source code. This patch allow tcc to look in an other directory and also to look in extra directories. It's then possible to make tcc search libraries in /lib/x86_64-linux-gnu and /usr/local/lib/x86_64-linux-gnu while crt*.o files are searched in /usr/lib/x86_64-linux-gnu and ld.so is searched in /lib/x86_64-linux-gnu.
* Make examples' shebang use target tcc bindir pathThomas Preud'homme2011-06-184-7/+14
| | | | | | Use @BINDIR@ in shebang of examples to put the right path on the target system. That is, use #!/usr/local/bin/tcc if tcc is installed in /usr/local/bin and #!/usr/bin/tcc if tcc is installed in /usr/bin/tcc.
* Default to create progs with symbols (incl. debug)Thomas Preud'homme2011-06-172-5/+15
| | | | | | | * Set CFLAGS entirely in configure if not already set. * Compile bcheck.c with the same flags as the other source files * Don't strip binaries by default (GB are cheap now) but provide a --strip-binaries option in configure script.
* Update ChangelogThomas Preud'homme2011-05-171-5/+6
| | | | | | | * Mention the various ARM improvement * Make changelog consistent with regards to initial capital letters * Fix credits for VLA * Fix entry about asm label (variable are also supported)
* make test work when LIBTCC1 not definedThomas Preud'homme2011-05-172-1/+7
| | | | | Make libtest depends on LIBTCC1 instead of ../libtcc1.a and define LIBTCC1 to $(TOP)/$(LIBTCC1) if LIBTCC1 is defined
* tcc-doc: remove obsolete '-o option must also be given'grischka2011-05-171-6/+4
|
* Fix calling ARM EABI functions returning big structuresDaniel Glöckner2011-05-171-1/+1
| | | | The wrong type was tested to determine the size of the structure.
* Support scratchbox, Nokia N900 and qemu arm archsThomas Preud'homme2011-05-161-1/+1
| | | | Add arm, armv5tejl and armv7l to the list of supported arm architectures
* Remove unused variablesThomas Preud'homme2011-05-162-0/+5
| | | | | Declare float type conditionally to not declare them conditionally when they are not used.
* Remove unused variablesThomas Preud'homme2011-05-164-8/+14
| | | | | Remove unused local variables and declare them conditionally when they are used only on some architectures.
* Improve weak aliases handlingThomas Preud'homme2011-05-161-17/+19
| | | | | | * Include only the STB_GLOBAL alias symbol in .dynsym section * Stop the loop when STB_GLOBAL symbol is found * Reword / simplify comment
* make clean work when LIBTCC1 not definedThomas Preud'homme2011-05-141-0/+2
| | | | | Don't call make -C lib clean if LIBTCC1 is not defined, else make clean fails (for example of arm).
* fix spurious vstack-leak warnings on errorJoe Soroka2011-05-021-3/+3
|
* libtcc.c: report vstack "leaks" only if compile succeededJoe Soroka2011-04-141-2/+3
|
* use of TOK_alloca breaks cross compiler buildJoe Soroka2011-04-121-0/+4
| | | | | | | | | | | VLA inserts a call to alloca via enum TOK_alloca, but TOK_alloca only exists on I386 and X86_64 targets. This patch just emits an error at compile-time if someone tries to compile some VLA code for a TOK_alloca-less target. The best solution might be to just push the problem to link-time, since the existence-or-not of a alloca implementation can only be determined by linking. It seems like just declaring TOK_alloca unconditionally would achieve that, but for now, this at least gets the cross compilers to build.
* tcctok.h: fix ifdef target/host confusionJoe Soroka2011-04-121-1/+1
|
* simplify/rollback VLA pointer subtractionJoe Soroka2011-04-111-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know if it makes a difference to gen_op(TOK_PDIV) or not, but logically the ptr1_is_vla test in TP's VLA patch seems out of order, where the patch to fix it would be: ------------------------------------------------------------------ @@ -1581,15 +1581,15 @@ ST_FUNC void gen_op(int op) u = pointed_size(&vtop[-1].type); } gen_opic(op); + if (ptr1_is_vla) + vswap(); /* set to integer type */ #ifdef TCC_TARGET_X86_64 vtop->type.t = VT_LLONG; #else vtop->type.t = VT_INT; #endif - if (ptr1_is_vla) - vswap(); - else + if (!ptr1_is_vla) vpushi(u); gen_op(TOK_PDIV); } else { ------------------------------------------------------------------ Instead of that patch, which increases the complexity of the code, this one fixes the problem by just rolling back and retrying with a simpler approach.
* update documentation to reflect VLA changesJoe Soroka2011-04-091-3/+3
|