diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-05-03 21:06:46 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-05-03 21:06:46 +0200 |
commit | 2994fccbe1b881c3fa2838926d22af8aeda89640 (patch) | |
tree | 5fb20d75de24c162c1116fa2f3b4ff98cbdbd3dd /arm64/include/ape/stdarg.h | |
parent | dfd915892a662216fa1f422ea56b89c8b34e3175 (diff) |
ape: initial support for arm64
Diffstat (limited to 'arm64/include/ape/stdarg.h')
-rw-r--r-- | arm64/include/ape/stdarg.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arm64/include/ape/stdarg.h b/arm64/include/ape/stdarg.h new file mode 100644 index 000000000..cf466841f --- /dev/null +++ b/arm64/include/ape/stdarg.h @@ -0,0 +1,18 @@ +#ifndef __STDARG +#define __STDARG + +typedef char *va_list; + +#define va_start(list, start) list = (sizeof(start)<8 ? (char *)((long long *)&(start)+1) : \ +(char *)(&(start)+1)) +#define va_end(list) +#define va_arg(list, mode)\ + ((sizeof(mode) == 1)?\ + ((mode*)(list += 8))[-8]:\ + (sizeof(mode) == 2)?\ + ((mode*)(list += 8))[-4]:\ + (sizeof(mode) == 4)?\ + ((mode*)(list += 8))[-2]:\ + ((mode*)(list += sizeof(mode)))[-1]) + +#endif /* __STDARG */ |