changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / arm64/include/ape/stdarg.h

changeset 7190: 41fb44a3b2dc
author: cinap_lenrek@felloff.net
date: Fri, 03 May 2019 21:06:46 +0200
permissions: -rw-r--r--
description: ape: initial support for arm64
1 #ifndef __STDARG
2 #define __STDARG
3 
4 typedef char *va_list;
5 
6 #define va_start(list, start) list = (sizeof(start)<8 ? (char *)((long long *)&(start)+1) : \
7 (char *)(&(start)+1))
8 #define va_end(list)
9 #define va_arg(list, mode)\
10  ((sizeof(mode) == 1)?\
11  ((mode*)(list += 8))[-8]:\
12  (sizeof(mode) == 2)?\
13  ((mode*)(list += 8))[-4]:\
14  (sizeof(mode) == 4)?\
15  ((mode*)(list += 8))[-2]:\
16  ((mode*)(list += sizeof(mode)))[-1])
17 
18 #endif /* __STDARG */