aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* A gcc preprocessor option -dD addedseyko2015-03-034-22/+84
| | | | | | | | | With this option on a defines are included into the output (inside comments). This will allow to debug a problems like: In file included from math.c:8: In file included from /usr/include/math.h:43: /usr/include/bits/nan.h:52: warning: NAN redefined
* Added a gcc preprocessor options -P, -P1seyko2015-03-034-10/+46
| | | | | | | | | | | tcc -E -P do not output a #line directive, a gcc compatible option tcc -E -P1 don't follow a gcc preprocessor style and do output a standard #line directive. In such case we don't lose a location info when we going to compile a resulting file wtith a compiler not understanding a gnu style line info.
* Move a line_ref variable from tcc_preprocess() function into struct ↵seyko2015-03-032-5/+6
| | | | | | | BufferedFile. This id needed for a right ouput in other places, precisely to calculate a number of empty lines which are waiting to output.
* A preprocessor should Interpret an input line "# NUM FILENAME" as "#line NUM ↵seyko2015-03-031-1/+6
| | | | | | | | | | | FILENAME" A cpp from gcc do this. A test case: tcc -E tccasm.c -o tccasm.i tcc -E tccasm.i -o tccasm.ii After a patch the line numbers in tccasm.ii are the same as in tccasm.i
* arm64-gen.c: Improve generation of stack offsets.Edmund Grimley Evans2015-03-021-2/+10
|
* arm64-gen.c: Rename some functions and add comments.Edmund Grimley Evans2015-03-021-76/+79
|
* arm64: Improve constant generation, with tests.Edmund Grimley Evans2015-03-023-8/+55
|
* arm64-gen.c: Better explanation of relocation choice.Edmund Grimley Evans2015-03-011-21/+24
|
* 73_arm64.c: Avoid taking address of return value.Edmund Grimley Evans2015-02-261-21/+42
|
* Add 73_arm64 for testing some arm64 things, mostly PCS.Edmund Grimley Evans2015-02-253-0/+529
|
* arm64-gen.c: In gen_va_arg, handle the remaining HFA cases.Edmund Grimley Evans2015-02-251-9/+27
|
* Relicensing TinyCCEdmund Grimley Evans2015-02-251-0/+1
|
* tests/tcctest.c: Test COMPAT_TYPE(char *, signed char *).Edmund Grimley Evans2015-02-241-0/+2
|
* tccgen.c: Make sure that gen_op always returns an rvalue.Edmund Grimley Evans2015-02-231-0/+3
| | | | Either this fix, or an alternative one, is required for arm64.
* aarch64: Fix -run.Michael Matz2015-02-232-10/+54
| | | | | | | This adds some more support for properly transfering some offsets over the different stages of a relocations life. Still not at all psABI compliant and DSOs can't yet be generated. But it runs the testsuite in qemu-arm64.
* Add arm64 (AArch64) as a target architecture.Edmund Grimley Evans2015-02-2316-40/+3265
|
* Use RELA relocations properly for R_DATA_PTR on x86_64.Edmund Grimley Evans2015-02-214-13/+46
| | | | | | | libtcc.c: Add greloca, a generalisation of greloc that takes an addend. tcc.h: Add greloca and put_elf_reloca. tccelf.c: Add put_elf_reloca, a generalisation of put_elf_reloc. tccgen.c: On x86_64, use greloca instead of greloc in init_putv.
* tcc-doc.texi: Explain VT_LLOCAL a bit better.Edmund Grimley Evans2015-02-201-2/+4
| | | | And delete the sentence about it being removed.
* Fix handling of case_reg in switch statement.Edmund Grimley Evans2015-02-201-0/+3
| | | | | | The back end functions gen_op(comparison) and gtst() might allocate registers so case_reg should be left on the value stack while they are called and set again afterwards.
* The "open a whisky and cut your finger open" patchThomas Preud'homme2015-02-183-37/+62
| | | | Make integer constant parsing C99 compliant
* Add support for .p2align asm directive.Reimar Döffinger2015-01-202-0/+9
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Fix macro expansion of empty args.Reimar Döffinger2015-01-184-2/+14
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Set CONFIG_MULTIARCHDIR for cross compilers.Reimar Döffinger2015-01-181-4/+4
| | | | | | | Chances a cross-compiler will find a working crt*.o in /usr/lib are more or less 0. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Build also WinCE cross compiler when cross compilers enabled.Reimar Döffinger2015-01-181-5/+5
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Allow tcc to understand a setob,... opcodes as alias to seto,...seyko2015-01-065-34/+39
| | | | | | PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html This is fix PR8686 for llvm: accepting a 'b' suffix at the end of all the setcc instructions.
* Warn about a conflicting compile options spectified on the command line.seyko2015-01-063-7/+19
| | | | Try "tcc -E -c tccasm.c -o tccasm.o"
* .i as file extensionseyko2015-01-061-1/+1
| | | | | | | | | | | Add a ".i" extension as alias for ".c" GCC and file extensions: .i C source code which should not be preprocessed. Before a patch: ./tcc -E tccasm.c -o tccasm.i ./tcc -c tccasm.i -o tccasm.o tccasm.i:1: error: unrecognized file type
* round() in test (24_math_library) fail because there are no defs included.seyko2015-01-051-0/+2
| | | | gcc complain but work right and tcc simply fail to compile right.
* crt1.c revisionCarlos Montiers2014-12-301-23/+53
|
* Fix parsing of binary floating point numberLee Duhem2014-12-154-2/+133
| | | | | | | * tccpp.c (parse_number): `shift' should be 1 while parsing binary floating point number. * tests/tests2/70_floating_point_literals.c: New test cases for floating point number parsing.
* tcc.h (BufferedFile): Remove unnecessary static memory allocationLee Duhem2014-12-111-1/+1
| | | | | The memory needed by `buffer' will be allocated in `tcc_open_bf', these is no need to allocate them in BufferedFile statically.
* libtcc.c (put_extern_sym2): Extend the scope of buf to match its useLee Duhem2014-12-111-2/+1
| | | | | After leaving the code block that `buf' is defined, `buf' will not exist, so `name' will point to a variable that does not exist.
* .gitignore: Ignore Emacs temporary filesLee Duhem2014-12-111-1/+2
|
* Makefile: Add rules to create tags and TAGS.Lee Duhem2014-11-281-2/+9
|
* .gitignore: Ignore generated files.Lee Duhem2014-11-281-0/+4
|
* little optimization to crt1Carlos Montiers2014-11-231-5/+6
|
* __getmainargs compatibility checking successCarlos Montiers2014-11-221-10/+14
|
* win32: fix implicit function warningJames Buren2014-11-031-0/+2
| | | | | This includes windows.h to fix a warning about an implicit function usage of ExitProcess().
* Filter-out warning about softfloat in tests2Matteo Cypriani2014-10-171-2/+2
|
* tccgen: use lvalue as result from bitfield assignmentgrischka2014-09-231-7/+5
| | | | | | | | | | | | | | | | | | | test case: #include <stdio.h> int main(int argc, char **argv) { struct _s { unsigned a:9, b:5, c:7; } _s, *s = &_s; int n = 250; s->a = s->b = s->c = n + 4; printf("--> %d / %d / %d\n", s->a, s->b, s->c); return 0; } before: --> 254 / 30 / 126 now: --> 30 / 30 / 126
* Accept CPPFLAGS from the environmentMatteo Cypriani2014-09-071-1/+1
| | | | | | | Don't override CPPFLAGS so that it can be passed through the environment. (This is a patch Thomas Preud'homme wrote for Debian in February 2013.)
* tccelf: layout_sections: add missing param strsecMatteo Cypriani2014-09-071-3/+4
| | | | This fixes compilation on (k)FreeBSD.
* Clear CFLAGS & LDFLAGS in testsMatteo Cypriani2014-09-072-0/+8
| | | | | | Clear CFLAGS and LDFLAGS to build the tests, in case the main Makefile passes some flags that aren't handled by tcc (we are not compiling tcc here, we are using tcc to compile the tests).
* Don't build libtcc1 with -fstack-protector-strongMatteo Cypriani2014-09-071-0/+4
| | | | | | | Prevent libtcc1.a to be compiled with -fstack-protector-strong, so that linking with tcc doesn't fail because symbol '__stack_chk_fail_local' is not present in libtcc1.a. This is useful only if the CFLAGS passed from the main Makefile contain this flag.
* tccgen: nocode_wanted: do not output constantsgrischka2014-08-012-16/+18
| | | | | | | | | | | | | | | | | | | | This for example suppresses string constants such as with int main() { return sizeof "foo"; } Actually, setting nocode_wanted = 1; in libtcc.c for the initial global level seemed wrong, since obviously "nocode_wanted" means code as any side effects, also such as string constants. This reverts a part of 2de1b2d14cc920e2c698ff0086f5558c2da7f569 (documented as "Some in-between fixes" in Changelog)
* win64: fix resource file supportgrischka2014-08-012-31/+33
|
* Removed the error message and minor changes.Carlos Montiers2014-07-171-9/+11
|
* __getmainargs return int, not void, and on error, it return -1 and let argv ↵Carlos Montiers2014-07-161-2/+7
| | | | untouched, also argc. Added a if checking the result of it.
* Fix mistake. Change jb by jbe. tiny c round (INT_MAX = 0x7FFFFFFF) to a ↵Carlos Montiers2014-07-103-3/+3
| | | | DWORD boundary and it becomes 0x80000000. Jle treats as -214783648, but Jbe treats as 214783648. Thanks to Jason Hood for explain me this.
* Fix problem using alloca function, executable crashed even with a exception ↵Carlos Montiers2014-07-103-6/+6
| | | | handler function, when try to allocate INT_MAX. Patch provided by Jason Hood in private e-mail, when I ask to him for help. He say: Feel free to pass it on to the mailing list.