aboutsummaryrefslogtreecommitdiff
path: root/tcctok.h
Commit message (Collapse)AuthorAgeFilesLines
* correct version of "Identifiers can start and/or contain"seyko2016-04-131-26/+31
| | | | | | | A problem was in TOK_ASMDIR_text: - sprintf(sname, ".%s", get_tok_str(tok1, NULL)); + sprintf(sname, "%s", get_tok_str(tok1, NULL)); When tok1 is '.text', then sname is '..text'
* revert of the 'Identifiers can start and/or contain'seyko2016-04-131-31/+26
| | | | | | | | When tccboot kernels compiles with 'Identifiers can start and/or', this kernel don't start. It is hard to find what is wrong. PS: there was no test for identifiers in *.S with '.'
* Identifiers can start and/or contain '.' in *.Sseyko2016-04-051-26/+31
| | | | | | | | | | | | | | | | | modified version of the old one which don't allow '.' in #define Identifiers. This allow correctly preprocess the following code in *.S #define SRC(y...) \ 9999: y; \ .section __ex_table, "a"; \ .long 9999b, 6001f ; \ // .previous SRC(1: movw (%esi), %bx) 6001: A test included.
* reverse of the "Identifiers can start and/or contain '.'"seyko2016-04-031-31/+26
| | | | | | | | | | | | | | | | | - Identifiers can start and/or contain '.' in PARSE_FLAG_ASM_FILE - Move all GAS directives under TOK_ASMDIR prefix This patches breaks compilation of the tccboot (linux 2.4.26 kernel). A test.S which fails with this patches: #define SRC(y...) \ 9999: y; \ .section __ex_table, "a"; \ .long 9999b, 6001f<---->; \ .previous SRC(1:<>movw (%esi), %bx<------>) // 029-test.S:7: error: macro 'SRC' used with too many args
* Move all GAS directives under TOK_ASMDIR prefix to include leading '.'Vlad Vissoultchev2016-03-151-26/+31
| | | | Use only these tokens in `asm_parse_directive` and don't recycle others' tokens (like TOK_SECTION1)
* tcctok.h: Put TOK_memmove in the correct places (I hope).Edmund Grimley Evans2015-11-051-1/+2
| | | | This should have been part of b051549. Someone should test on ARM.
* tcctok.h: Revert 41408f2, which moved TOK_memmove.Edmund Grimley Evans2015-11-051-1/+1
|
* fix for the "tccgen.c: Use memmove for struct assignment"seyko2015-11-051-1/+1
| | | | | | | | | | | ./configure --enable-cross make tcc -o i386-tcc tcc.c tcc -o x86_64-tcc tcc.c tcc -o i386-win-tcc tcc.c In file included from tcc.c:22: In file included from libtcc.c:39: tccgen.c:2580: error: 'TOK_memmove' undeclared
* Revert all of my changes to directories & codingstyle.gus knight2015-07-291-0/+335
|
* Reorganize the source tree.gus knight2015-07-271-335/+0
| | | | | | | | | | * Documentation is now in "docs". * Source code is now in "src". * Misc. fixes here and there so that everything still works. I think I got everything in this commit, but I only tested this on Linux (Make) and Windows (CMake), so I might've messed something up on other platforms...
* Trim trailing spaces everywhere.gus knight2015-07-271-1/+1
|
* tccpp: alternative #pragma push/pop_macrogrischka2015-04-231-0/+2
| | | | | | | using next_nomacro() so that for example #define push_macro foobar does not affect how the pragma works (same behavior as gcc, albeit not MS's cl).
* Revert "* and #pragma pop_macro("macro_name")"grischka2015-04-231-2/+0
| | | | | | | | | | | | - pop_macro incorrect with initially undefined macro - horrible implementation (tcc_open_bf) - crashes eventually (abuse of Sym->prev_tok) - the (unrelated) asm_label part is the opposite of a fix (Despite of its name this variable has nothing to do with the built-in assembler) This reverts commit 0c8447db7970813292a8be74ee50e49091be5d15.
* "#pragma once" implementationseyko2015-04-211-0/+1
|
* * and #pragma pop_macro("macro_name")seyko2015-04-211-0/+2
| | | | | | | | | | * give warning if pragma is unknown for tcc * don't free asm_label in sym_free(), it's a job of the asm_free_labels(). The above pragmas are used in the mingw headers. Thise pragmas are implemented in gcc-4.5+ and current clang.
* implement #pragma comment(lib,...)Steven G. Messervey2015-04-151-0/+2
|
* Revert "implement #pragma comment(lib,...)"Steven G. Messervey2015-04-151-3/+0
| | | | | | This reverts commit 8615bb40fb39bf7435462ca54cbbc24aaecae502. Reverting as it breaks on MinGW targets
* implement #pragma comment(lib,...)Steven G. Messervey2015-04-151-0/+3
|
* replace a method to force bcheck.o linkingseyko2015-04-121-0/+1
| | | | | | * define __bound_init as external_global_sym insteed of the compiling a tiny program * remove warning about buf[] when CONFIG_TCC_BCHECK is not defined
* arm64: Implement __clear_cache.Edmund Grimley Evans2015-03-081-0/+1
| | | | | | __clear_cache is defined in lib-arm64.c with a single call to __arm64_clear_cache, which is the real built-in function and is turned into inline assembler by gen_clear_cache in arm64-gen.c
* Add __builtin_return_address.Edmund Grimley Evans2015-03-061-0/+1
| | | | | | Implementation is mostly shared with __builtin_frame_address. It seems to work on arm64, i386 and x86_64. It may need to be adapted for other targets.
* partial revert of the commit 4ad186c5ef61seyko2015-03-041-0/+4
| | | | | | | | | | | | | | | A test program: /* result of the new version inroduced in 4ad186c5ef61: t2a = 44100312 */ #include<stdio.h> int main() { int t1 = 176401255; float f = 0.25f; int t2a = (int)(t1 * f); // must be 44100313 int t2b = (int)(t1 * (float)0.25f); printf("t2a=%d t2b=%d \n",t2a,t2b); return 0; }
* Add arm64 (AArch64) as a target architecture.Edmund Grimley Evans2015-02-231-0/+33
|
* Add support for .p2align asm directive.Reimar Döffinger2015-01-201-0/+1
| | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* Parse assembler .hidden directiveMichael Matz2014-04-141-0/+1
| | | | | This makes TCCs assembler understand the '.hidden symbol' directive (and emits a STV_HIDDEN ELF symbol then).
* Parse and emit hidden visibilityMichael Matz2014-04-141-0/+2
| | | | | | | This adds parsing of (GCC compatible) visibility attribute in order to mark selected global symbols as hidden. The generated .o files contain hidden symbols already, the TCC linker doesn't yet do the right thing.
* Create bcheck region for argv and arge argumentThomas Preud'homme2014-03-291-0/+1
| | | | | | | | | | | For program manipulating argv or arge as pointer with construct such as: (while *argv++) { do_something_with_argv; } it is necessary to have argv and arge inside a region. This patch create regions argv and arge) if main is declared with those parameters.
* i386: use __fixdfdi instead of __tcc_cvt_ftolgrischka2014-01-061-43/+46
| | | | | | | | | | | | Variants __fixsfdi/__fixxfdi are not needed for now because the value is converted to double always. Also: - remove __tcc_fpinit for unix as it seems redundant by the __setfpucw call in the startup code - avoid reference to s->runtime_main in cross compilers - configure: fix --with-libgcc help - tcctok.h: cleanup
* Revert "Add support for thread-local storage variables"Thomas Preud'homme2013-11-031-1/+0
| | | | | | | | | | TLS support in tinyCC is absolutely not ready: - segment register not select in load and store - no relocation added for computing offset of per-thread symbol - no support for TLS-specific relocations - no program header added as per Drepper document about TLS This reverts commit 1c4afd13501f07a673aed5f130166f2ee0f30927.
* Add support for thread-local storage variablesThomas Preud'homme2013-10-291-0/+1
|
* i386-gen: preserve fp control word in gen_cvt_ftoigrischka2013-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | - Use runtime function for conversion - Also initialize fp with tcc -run on windows This fixes a bug where double x = 1.0; double y = 1.0000000000000001; double z = x < y ? 0 : sqrt (x*x - y*y); caused a bad sqrt because rounding precision for the x < y comparison was different to the one used within the sqrt function. This also fixes a bug where printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2)); would print 100, 99 Unrelated: win32: document relative include & lib lookup win32: normalize_slashes: do not mirror silly gcc behavior This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890 winapi: add missing WINAPI decl. for some functions
* 64-bit tests now pass (well, nearly).James Lyon2013-04-241-0/+4
| | | | | tcctest1-3 fail, but this appears to be due to bugs in GCC rather than TCC (from manual inspection of the output).
* tcctok.h: fix ifdef target/host confusionJoe Soroka2011-04-121-1/+1
|
* re-apply VLA by Thomas Preud'hommeJoe Soroka2011-04-061-0/+2
|
* tccgen: handle __attribute((alias("target")))Joe Soroka2011-03-031-0/+2
|
* Revert "Make TOK_alloca available for x86-64"Thomas Preud'homme2011-02-051-2/+0
| | | | This reverts commit af26ac56bfc584b70e20158e67f7035024076ec8.
* Make TOK_alloca available for x86-64Thomas Preud'homme2011-02-041-0/+2
| | | | | | | TOK_alloca is now available on x86-64 so make put definition of TOK_alloca outside the BCHECK conditional macro definition but test if arch is i386 or x86-64. This makes C99 VLA works (understand compile) on x86-64.
* Support struct arguments with stdarg.hShinichiro Hamaji2010-12-281-6/+1
| | | | | | | | - add __builtin_va_arg_types to check how arguments were passed - move most code of stdarg into libtcc1.c - remove __builtin_malloc and __builtin_free - add a test case based on the bug report (http://www.mail-archive.com/tinycc-devel@nongnu.org/msg03036.html)
* Add nan, snan and inf float constantsThomas Preud'homme2010-05-061-2/+7
|
* tccasm: Detect (but ignore) .ident directiveDetlef Riekenberg2010-04-051-0/+1
| | | | | | | tcc is now able to compile many asm files generated by gcc -- By by ... Detlef
* tccasm: Detect (but ignore) .size directiveDetlef Riekenberg2010-04-051-0/+1
| | | | | -- By by ... Detlef
* tccasm: Support .type directive (only name,@function)Detlef Riekenberg2010-04-051-0/+1
| | | | | -- By by ... Detlef
* tccasm: Detect (but ignore) the .file directiveDetlef Riekenberg2010-04-051-0/+1
| | | | | | | | | Some patches, to allow tcc to compile asm sources generated by gcc and help tcc with the autoconf stuff used in Wine ( http://source.winehq.org/git/wine.git/ ) -- By by ... Detlef
* weak function symbolsManuel Simoni2010-02-271-0/+2
|
* Add support for the __mode__ attributeDetlef Riekenberg2010-01-261-0/+4
| | | | | -- By by ... Detlef
* win32: enable bounds checker & exception handlergrischka2009-12-191-1/+3
| | | | exception handler borrowed from k1w1. Thanks.
* integrate x86_64-asm.c into i386-asm.cgrischka2009-12-191-5/+1
| | | | | Also, disable 16bit support for now as it causes bugs in 32bit mode. #define I386_ASM_16 if you want it.
* fixed and added missing file for x86_64 assemblyFrederic Feret2009-11-131-1/+1
|
* first support of x86_64 assemblyFrederic Feret2009-11-131-215/+6
|
* added 16-bit x86 assembly supportFrederic Feret2009-11-131-0/+5
|