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.
Showing the changes to include (1 of 4 files). Show all
Unified · Split
| @@ -7,13 +7,13 @@ · 6 unmodified lines | ||
| 7 | 7 | typedef void *va_list; |
| 8 | 8 | |
| 9 | 9 | va_list __va_start(void *fp); |
| 10 | −void *__va_arg(va_list ap, int arg_type, int size); | |
| 10 | +void *__va_arg(va_list ap, int arg_type, int size, int align); | |
| 11 | 11 | va_list __va_copy(va_list src); |
| 12 | 12 | void __va_end(va_list ap); |
| 13 | 13 | |
| 14 | 14 | #define va_start(ap, last) ((ap) = __va_start(__builtin_frame_address(0))) |
| 15 | 15 | #define va_arg(ap, type) \ |
| 16 | − (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type)))) | |
| 16 | + (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type), __alignof__(type)))) | |
| 17 | 17 | #define va_copy(dest, src) ((dest) = __va_copy(src)) |
| 18 | 18 | #define va_end(ap) __va_end(ap) |
| 19 | 19 | |