Commit Graph

23 Commits (2d3b9559bf569f137cefb7f8386a0dc58e33c81f)

Author SHA1 Message Date
David Mertens 0a402f6e91 Avoid conflicting definition for va_list on 64-bit Macs 2016-08-04 13:14:52 -04:00
grischka 41349948f8 win64: fix va_arg
fixes 5c35ba66c5

Implementation was consistent within tcc but incompatible
with the ABI (for example library functions vprintf etc)

Also:
- tccpp.c/get_tok_str() : avoid "unknown format "%llu" warning
- x86_64_gen.c/gen_vla_alloc() : fix vstack leak
2016-07-10 20:44:49 +02:00
seyko 12f94f2770 include/stddef.h: define NULL only if undefined 2015-10-25 00:19:12 +03:00
Edmund Grimley Evans b14ef0e24b Add arm64 (AArch64) as a target architecture. 2015-02-23 22:51:03 +00:00
Vincent Lefevre 3e9a7e9d69 Corrected spelling mistakes in comments and strings 2014-04-07 13:31:00 +02:00
Michael Matz f01373765b stdbool.h: Make conformant to ISOC99
For conformance to ISO C the stdbool.h header has to provide
the macro __bool_true_false_are_defined (defined to 1).  Yep,
that name is really in the standard.
2014-04-07 00:30:31 +02:00
Michael Matz 0961a38493 Declare wint_t in <stddef.h> when needed
Some old glibcs <wctype.h> require <stddef.h> to provide
wint_t, accomodate them.
2014-04-07 00:27:46 +02:00
Daniel Glöckner 3900b235e0 x86_64: pass va_list as pointer
The ABI requires that va_list is passed as a pointer although its
contents is a kept in a structure. Therefore make it a single element
array.
2014-03-30 00:13:58 +01:00
mingodad c025478d7c New implementation of va_list/va_start/var_copy that do not use dynamic memory, with this when compiling fossil-scm with tcc on linux X86_64 it works fine. 2014-03-28 20:28:19 +00:00
Vincent Lefevre 262eec3e83 Fixed the LDBL_* macros in include/float.h for x86-64: as said
when x86-64 support was added, "for long double, we use x87 FPU".
And indeed, tests show that Intel's extended precision is used,
not double precision.
2014-01-12 22:26:09 +01:00
Thomas Preud'homme 4260ce1889 Add va_* macro implementation for ARM 2013-11-25 11:24:02 +08:00
James Lyon 6ee366e765 Fixed x86-64 long double passing.
long double arguments require 16-byte alignment on the stack, which
requires adjustment when the the stack offset is not an evven number of
8-byte words.
2013-04-26 16:42:12 +01:00
James Lyon 1caee8ab3b Sorted out CMake on x86-64 and fixed silly XMM# bug introduced when working on Win64 stdargs.
I removed the XMM6/7 registers from the register list because they are not used
on Win64 however they are necessary for parameter passing on x86-64. I have now
restored them but not marked them with RC_FLOAT so they will not be used except
for parameter passing.
2013-04-25 22:30:53 +01:00
James Lyon 5c35ba66c5 64-bit tests now pass (well, nearly).
tcctest1-3 fail, but this appears to be due to bugs in GCC rather than TCC
(from manual inspection of the output).
2013-04-24 02:19:15 +01:00
grischka b89793d10a win32: _mingw.h: do not undef NULL
Not wise if stddef.h was already included. This is related to commit

    3aa26a794e

Instead hack stddef.h to have identical definition and thus
avoid the issue mentionned there.
2013-01-24 19:49:58 +01:00
Thomas Preud'homme 9ffd77f18d Remove semicolon in x86-64 va_arg definition. 2011-08-05 20:32:57 +02:00
Shinichiro Hamaji 0ed7ba3f5e Support struct arguments with stdarg.h
- 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)
2010-12-28 19:32:40 +09:00
grischka e20bf69ac5 win64: defined size_t and ptrdiff_t to unsigned long long 2010-01-14 20:59:43 +01:00
grischka dc251a7d8d win64: use new headers from mingw 2009-07-18 22:06:37 +02:00
grischka 110a4edc15 drop alloca #define
(Because GNU's alloca.h unconditionally #undef's alloca)

Also, remove gcc specific sections in headers. and
instead change tests such that gcc does not use them.
2009-05-16 22:30:13 +02:00
Shinichiro Hamaji 859da934e0 Return value of exit should be void. 2009-04-18 23:55:51 +09:00
grischka 5829791ffa fix makefiles etc for subdirs 2009-04-18 15:08:03 +02:00
grischka ea5e81bd6a new subdirs: include, lib, tests 2009-04-18 15:08:03 +02:00