aboutsummaryrefslogtreecommitdiff
path: root/i386-gen.c
Commit message (Collapse)AuthorAgeFilesLines
...
* avoid "decl after statement" pleasegrischka2013-04-301-2/+5
| | | | for compiling tcc with msc
* Improved variable length array support.James Lyon2013-04-271-0/+39
| | | | | | | | | | | | | | | VLA storage is now freed when it goes out of scope. This makes it possible to use a VLA inside a loop without consuming an unlimited amount of memory. Combining VLAs with alloca() should work as in GCC - when a VLA is freed, memory allocated by alloca() after the VLA was created is also freed. There are some exceptions to this rule when using goto: if a VLA is in scope at the goto, jumping to a label will reset the stack pointer to where it was immediately after the last VLA was created prior to the label, or to what it was before the first VLA was created if the label is outside the scope of any VLA. This means that in some cases combining alloca() and VLAs will free alloca() memory where GCC would not.
* Fixed i386 calling convention issue and CMake build on i386.James Lyon2013-04-261-0/+8
| | | | | The i386 calling convention expects the callee to pop 1 word of the stack when performing a struct ret.
* Tests in abitest.c now work on Win32.James Lyon2013-04-181-8/+27
| | | | | | | I expect that Linux-x86 is probably fine. All other architectures except ARM are definitely broken since I haven't yet implemented gfunc_sret for these, although replicating the current behaviour should be straightforward.
* add version number to manpageUrs Janssen2013-02-171-1/+1
| | | | | | | avoid c++/c99 style comments in preprocessor directives avoid leadings whitespaces in preprocessor directives mention implemented variable length arrays in documentation fixed ambiguous option in texi2html call (Austin English)
* i386: We can change 'lea 0(%ebp),r' to 'mov %ebp,r'Kirill Smelkov2012-11-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because that mov is 1 byte shorter, look: int *func() { return __builtin_frame_address(0); } before patch: 00000000 <func>: 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 81 ec 00 00 00 00 sub $0x0,%esp 9: 8d 45 00 lea 0x0(%ebp),%eax // <- here c: e9 00 00 00 00 jmp 11 <func+0x11> 11: c9 leave 12: c3 ret after patch: 00000000 <func>: 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 81 ec 00 00 00 00 sub $0x0,%esp 9: 89 e8 mov %ebp,%eax // <- here b: e9 00 00 00 00 jmp 10 <func+0x10> 10: c9 leave 11: c3 ret
* i386: fix loading of LLOCAL floatsDaniel Glöckner2012-01-231-1/+3
| | | | These loads clobbered ebx as TinyCC wanted to load the address into st0.
* s/derefencing/dereferencing/ in i386-gen.cThomas Preud'homme2012-01-081-1/+1
|
* rename error/warning -> tcc_(error/warning)grischka2011-08-111-1/+1
|
* chmod a-x i386-gen.cKirill Smelkov2010-06-161-0/+0
| | | | No need to keep executable bit on plain C source.
* generate inc and dec for smaller codeU-UNIT1\dennis2010-04-031-4/+10
|
* tccpe: improve dllimport/export and use for tcc_add_symbolgrischka2010-01-141-4/+6
|
* allow tcc be build from separate objectsgrischka2009-12-201-34/+44
| | | | If you want that, run: make NOTALLINONE=1
* win32: enable bounds checker & exception handlergrischka2009-12-191-1/+5
| | | | exception handler borrowed from k1w1. Thanks.
* fix uninitialized warnings with 'type.ref'grischka2009-12-191-0/+1
|
* tccpe: improve dllimportgrischka2009-12-191-29/+2
|
* integrate x86_64-asm.c into i386-asm.cgrischka2009-12-191-0/+13
| | | | | Also, disable 16bit support for now as it causes bugs in 32bit mode. #define I386_ASM_16 if you want it.
* win32: handle __declspec(dllimport)grischka2009-11-131-0/+34
|
* x86-64: Fix stab debug information.Shinichiro Hamaji2009-08-241-0/+1
| | | | | We need 32bit relocations for code and 64bit for debug info. Introduce a new macro R_DATA_PTR to distinguish the two usages.
* cleanup: constify some global datagrischka2009-07-181-1/+1
|
* win32: structure return GCC compatible (ret 4 with cdecl)grischka2009-06-171-0/+11
|
* move some global variables into TCCStategrischka2009-05-111-2/+3
|
* Set VT_LVAL_xxx flags for function arguments in gfunc_prolog (Daniel Glöckner)Daniel Glöckner2008-09-121-1/+1
|
* Switch to newer tccpe.c (includes support for resources)grischka2007-12-191-3/+3
|
* Bug fix: A long long value used as a test expression ignores the upper 32 ↵bellard2006-10-281-1/+2
| | | | bits at runtime (Dave Dodge)
* windows style fastcall (Filip Navara)bellard2005-09-031-4/+19
|
* _Bool type fixbellard2005-04-171-1/+1
|
* __chkstk supportbellard2005-04-101-5/+32
|
* copyright updatebellard2004-10-271-1/+1
|
* primitive fastcall functions supportbellard2004-10-181-9/+46
|
* faster (Daniel Glöckner)bellard2004-10-041-2/+2
|
* initial TMS320C67xx support (TK)bellard2004-10-041-0/+1
|
* ARM target support (Daniel Glockner) - allow unsigned char as default on ↵bellard2003-10-141-1/+11
| | | | ARM (Daniel Glockner) - fixed small ld script support (Daniel Glockner)
* changed license to LGPLbellard2003-05-241-12/+12
|
* simpler function call APIbellard2003-04-161-70/+58
|
* renamed registersbellard2002-12-081-18/+18
|
* added MAX_ALIGNbellard2002-11-241-0/+3
|
* added CType structure for type storage - supressed define hash table - added ↵bellard2002-11-181-36/+40
| | | | time dump in bench
* handle computed gotosbellard2002-11-031-6/+19
|
* trivial jump size optimizationbellard2002-09-081-2/+9
|
* fixed PC32 relocation if constant addressbellard2002-08-311-2/+4
|
* added symbol + relocation handlingbellard2002-08-291-26/+22
|
* realloc text section in code generationbellard2002-08-181-2/+12
|
* added size infobellard2002-07-271-1/+1
|
* use data_offset in sections instead of pointer to ease section reallocationbellard2002-07-271-29/+29
|
* moved bcheck.c outside of tcc - optimized add sp codebellard2002-07-241-13/+44
|
* added runtime library - fixed more relocationsbellard2002-07-221-15/+26
|
* moved relocation handling to elf generatorbellard2002-07-221-18/+0
|
* added GOT supportbellard2002-07-181-0/+5
|
* fixed PC32 relocationbellard2002-07-141-2/+2
|