diff options
| author | James Lyon <jamesly0n@hotmail.com> | 2013-04-26 16:42:12 +0100 |
|---|---|---|
| committer | James Lyon <jamesly0n@hotmail.com> | 2013-04-26 16:42:12 +0100 |
| commit | 6ee366e765483f6b48537d97fc81ae56f13d1b7f (patch) | |
| tree | c9365133ee9c4cf1ec4fcee0641ac9adc2fe825d /include/stdarg.h | |
| parent | 41d76e1fcbe498b0d01e245f5a2d368a23760101 (diff) | |
| download | tinycc-6ee366e765483f6b48537d97fc81ae56f13d1b7f.tar.gz tinycc-6ee366e765483f6b48537d97fc81ae56f13d1b7f.tar.bz2 | |
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.
Diffstat (limited to 'include/stdarg.h')
| -rw-r--r-- | include/stdarg.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stdarg.h b/include/stdarg.h index 154030f..efca0e5 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -7,13 +7,13 @@ typedef void *va_list; va_list __va_start(void *fp); -void *__va_arg(va_list ap, int arg_type, int size); +void *__va_arg(va_list ap, int arg_type, int size, int align); va_list __va_copy(va_list src); void __va_end(va_list ap); #define va_start(ap, last) ((ap) = __va_start(__builtin_frame_address(0))) #define va_arg(ap, type) \ - (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type)))) + (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type), __alignof__(type)))) #define va_copy(dest, src) ((dest) = __va_copy(src)) #define va_end(ap) __va_end(ap) |
