History

win64: fix va_arg

fixes 5c35ba66c5ade4713bbd9c005e66889f6d7db293 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

grischka committed 10 years ago

Commit 41349941 parent 03609055 files · +12 −5Browse files

Showing the changes to include (1 of 5 files). Show all

Unified · Split

include/stdarg.h+2−1
@@ -30,7 +30,8 @@ void *__va_arg(__va_list_struct *ap, int arg_type, int size, int align); · 29 unmodified lines
30#else /* _WIN64 */30#else /* _WIN64 */
31typedef char *va_list;31typedef char *va_list;
32#define va_start(ap,last) __builtin_va_start(ap,last)32#define va_start(ap,last) __builtin_va_start(ap,last)
33#define va_arg(ap,type) (ap += 8, sizeof(type)<=8 ? *(type*)ap : **(type**)ap)33#define va_arg(ap, t) ((sizeof(t) > 8 || (sizeof(t) & (sizeof(t) - 1))) \
34 ? **(t **)((ap += 8) - 8) : *(t *)((ap += 8) - 8))
34#define va_copy(dest, src) ((dest) = (src))35#define va_copy(dest, src) ((dest) = (src))
35#define va_end(ap)36#define va_end(ap)
36#endif37#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t