From 6ee366e765483f6b48537d97fc81ae56f13d1b7f Mon Sep 17 00:00:00 2001 From: James Lyon Date: Fri, 26 Apr 2013 16:42:12 +0100 Subject: 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. --- include/stdarg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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) -- cgit v1.3.1