]> git.lizzy.rs Git - plan9front.git/blob - arm/include/u.h
continue...
[plan9front.git] / arm / include / u.h
1 #define nil             ((void*)0)
2
3 typedef unsigned short  ushort;
4 typedef unsigned char   uchar;
5 typedef unsigned long   ulong;
6 typedef unsigned int    uint;
7 typedef signed char     schar;
8 typedef long long       vlong;
9 typedef unsigned long long uvlong;
10 typedef unsigned long   uintptr;
11 typedef unsigned long   usize;
12 typedef ushort          Rune;
13 typedef         union FPdbleword FPdbleword;
14 typedef long    jmp_buf[2];
15 #define JMPBUFSP        0
16 #define JMPBUFPC        1
17 #define JMPBUFDPC       0
18 typedef unsigned int    mpdigit;        /* for /sys/include/mp.h */
19 typedef unsigned char u8int;
20 typedef unsigned short u16int;
21 typedef unsigned int    u32int;
22 typedef unsigned long long u64int;
23
24 /* FCR */
25 #define FPINEX  (1<<20)
26 #define FPUNFL  (1<<19)
27 #define FPOVFL  (1<<18)
28 #define FPZDIV  (1<<17)
29 #define FPINVAL (1<<16)
30 #define FPRNR   (0<<0)
31 #define FPRZ    (1<<0)
32 #define FPRPINF (2<<0)
33 #define FPRNINF (3<<0)
34 #define FPRMASK (3<<0)
35 #define FPPEXT  0
36 #define FPPSGL  0
37 #define FPPDBL  0
38 #define FPPMASK 0
39 /* FSR */
40 #define FPAINEX (1<<4)
41 #define FPAUNFL (1<<3)
42 #define FPAOVFL (1<<2)
43 #define FPAZDIV (1<<1)
44 #define FPAINVAL        (1<<0)
45 union FPdbleword
46 {
47         double  x;
48         struct {        /* little endian */
49                 ulong lo;
50                 ulong hi;
51         };
52 };
53
54 typedef char*   va_list;
55 #define va_start(list, start) list =\
56         (sizeof(start) < 4?\
57                 (char*)((int*)&(start)+1):\
58                 (char*)(&(start)+1))
59 #define va_end(list)\
60         USED(list)
61 #define va_arg(list, mode)\
62         ((sizeof(mode) == 1)?\
63                 ((list += 4), (mode*)list)[-4]:\
64         (sizeof(mode) == 2)?\
65                 ((list += 4), (mode*)list)[-2]:\
66                 ((list += sizeof(mode)), (mode*)list)[-1])