aboutsummaryrefslogtreecommitdiff
path: root/arm-gen.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix allocation of struct in registers on ARMThomas Preud'homme2013-11-051-46/+44
| | | | | | | | | | | Allocation of struct in core and/or VFP registers on ARM is made by manipulating the value stack to create 3 distinct zones: parameters allocated on stack, parameters of type struct allocated in core registers and parameters of type struct allocated in VFP registers. Parameters of primitive type can be in any zone. This commit change the order of the zones from stack, VFP, core to stack, core, VFP (from highest addresses to lowest ones) in order to correctly deal the situation when structures are allocated both in core and VFP registers.
* Add support for load/store of _Bool valueThomas Preud'homme2013-06-141-2/+2
| | | | | Add support for loading _Bool value in i386, x86_64 and arm as well as support for storing _Bool value on arm.
* ARM hardfloat: fix struct return with float/double argsDaniel Glöckner2013-05-011-0/+1
| | | | Fixes the case where the structure is not returned in registers.
* Improved variable length array support.James Lyon2013-04-271-0/+15
| | | | | | | | | | | | | | | 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.
* x86-64 ABI fixes.James Lyon2013-04-191-3/+8
| | | | | | | | | abitest now passes; however test1-3 fail in init_test. All other tests pass. I need to re-test Win32 and Linux-x86. I've added a dummy implementation of gfunc_sret to c67-gen.c so it should now compile, and I think it should behave as before I created gfunc_sret.
* Tests in abitest.c now work on Win32.James Lyon2013-04-181-0/+13
| | | | | | | 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-2/+2
| | | | | | | 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)
* tcc.h: declare CValue.tab[LDOUBLE_SIZE/4]grischka2013-02-081-14/+18
| | | | | | | | Should fix some warnings wrt. access out of array bounds. tccelf.c: fix "static function unused" warning x86_64-gen.c: fix "ctype.ref uninitialzed" warning and cleanup tcc-win32.txt: remove obsolete limitation notes.
* Align on 4n bytes when copying fct args on stackThomas Preud'homme2013-02-051-0/+1
| | | | | When copying function arguments on stack in prolog, use multiple of 4 bytes for alignment.
* arm-gen.c: fix var initialization in gfunc_callThomas Preud'homme2013-02-041-2/+1
| | | | | | Fix initialization of args_size before doing register allocation. When adding hardfloat calling convention the initialization stopped being performed when !defined (TCC_ARM_EABI).
* arm: force rounding towards zero on cast to integer with VFPDaniel Glöckner2013-02-041-1/+1
| | | | | Cast to integer should not be affected by the current rounding mode as set by fesetround.
* arm: fix conversion from float/double to signed integer with VFPDaniel Glöckner2013-02-031-1/+1
| | | | The signed flag was not encoded in the instruction.
* arm: fix conversion from integer to float/double with VFPDaniel Glöckner2013-02-031-1/+1
| | | | The source register was not encoded in the instruction.
* arm: define TCC_ARM_VERSION for cross compilergrischka2013-01-301-0/+4
|
* Add my copyright for changes in arm-gen.cThomas Preud'homme2013-01-301-0/+1
|
* Fix stack alignment on 8 bytes at function callThomas Preud'homme2013-01-271-3/+3
| | | | | Ensure stack pointer is correctly adjusted in prolog to be aligned on 8 bytes after the change of frame linking.
* Organize frames in a real linked list on ARMThomas Preud'homme2013-01-261-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the linking of the frames on ARM. Instead of having fp points 12 bytes above where the old fp is stored, let fp points where the old fp is stored. That is, we switch from: | . | | . | | . | | | | params | <-- fp -------- | oldlr | -------- | oldip | -------- | oldfp | -------- to: | . | | . | | . | | | | params | -------- | oldlr | -------- | oldip | -------- | oldfp | <-- fp --------
* Fix OABI calling conventionThomas Preud'homme2012-11-281-3/+7
| | | | | | OABI calling convention was broken since the addition of the hardfloat calling convention in commit 7f6095bfec82b178084b22b33941d4f06155e514. This commit fixes the breakage.
* arm-gen.c: Invalid operator test always falseThomas Preud'homme2012-11-281-1/+1
| | | | | Invalid operator test is always false in gen_opf for arm (found with cppcheck). This patch fixes the issue.
* Only reference vfpr when availableThomas Preud'homme2012-11-211-0/+2
| | | | | | | A line in gfunc_call in arm-gen.c is referencing vfpr unconditionally. Yet, this function is only available when TCC_ARM_VFP is set. While this code is only triggered when TCC_ARM_VFP, it fails at compile time. This commit fix the problem.
* Add support for arm hardfloat calling conventionThomas Preud'homme2012-06-051-70/+310
| | | | | See Procedure Call Standard for the ARM Architecture (AAPCS) for more details.
* Remove vnrott (duplicate vrotb)Thomas Preud'homme2012-03-141-2/+2
|
* rename error/warning -> tcc_(error/warning)grischka2011-08-111-15/+15
|
* make: create native tcc from separate objectsgrischka2011-07-141-3/+6
| | | | | | | | | | | | | | | | | | | | | | | 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 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.
* Remove unused variablesThomas Preud'homme2011-05-161-0/+4
| | | | | Declare float type conditionally to not declare them conditionally when they are not used.
* ARM: use uint32_t for opcodesDaniel Glöckner2010-05-131-42/+43
| | | | fixes cross compiling on x86_64
* allow tcc be build from separate objectsgrischka2009-12-201-31/+39
| | | | If you want that, run: make NOTALLINONE=1
* 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
|
* ARM: fix big immediate offset constructionDaniel Glöckner2009-05-111-6/+6
| | | | | | | | The loop constructs to iterate over the non-overlapping, even positions of two or three bytes in a word were broken. This patch fixes the loops. It has been verified to generate the 72 combinations for two and the 80 combinations for three bytes.
* Runtime lib functionsDaniel Glöckner2008-09-121-41/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | Yesterday I felt the urge to change a few things in TinyCC. This is the first and biggest change of all of them. - use __aeabi_*divmod functions in ARM EABI to make binaries depend solely on standardized library functions - refactor ARM floating point <-> integer conversion a bit - rename long long->float and shift library functions to correspond to the names used by GCC - compile more tokens conditionally to reduce the size of TinyCC The intention is primarily to allow users of the ARM target to use libgcc (which is usually available as a shared library) instead of libtcc1 (which can't be compiled for ARM due to lack of an inline assembler). Changing the EABI target to use the divmod functions in theory allows to use it without libtcc1 on any (not necessarily GCC based) ARM EABI system. Daniel
* Set VT_LVAL_xxx flags for function arguments in gfunc_prolog (Daniel Glöckner)Daniel Glöckner2008-09-121-1/+1
|
* Import 409,410: ARM EABI by Daniel Glöcknergrischka2007-12-041-66/+380
|
* removed warningsbellard2004-11-071-3/+5
|
* ARM fixes (Daniel Glockner)bellard2004-10-041-86/+176
|
* initial TMS320C67xx support (TK)bellard2004-10-041-0/+1
|
* ARM target support (Daniel Glockner) - allow unsigned char as default on ↵bellard2003-10-141-0/+1293
ARM (Daniel Glockner) - fixed small ld script support (Daniel Glockner)