gen: move the management of ds[] to gen.c
[neatcc/cc.git] / ncc.h
blobc3d9b10482758da4dd96c7dc33d23fe309327b27
1 /* predefined array limits; (p.f. means per function) */
2 #define SECLEN (1 << 18) /* size of CS/DS sections */
3 #define BUFLEN (1 << 18) /* buffer size in cpp.c and tok.c */
4 #define STRLEN (1 << 17) /* size of strings */
5 #define NDATS 1024 /* number of DS data symbols */
6 #define NSYMS 4096 /* number of elf symbols */
7 #define NREL 4096 /* number of elf relocations */
8 #define NGLOBALS 1024 /* number of global variables */
9 #define NLOCALS 1024 /* number of locals p.f. */
10 #define NARGS 32 /* number of function/macro arguments */
11 #define NTMPS 64 /* number of expression temporaries */
12 #define NNUMS 1024 /* number of integer constants p.f. (arm.c) */
13 #define NJMPS 4096 /* number of jmp instructions p.f. */
14 #define NFUNCS 1024 /* number of functions */
15 #define NENUMS 1024 /* number of enum constants */
16 #define NTYPEDEFS 1024 /* number of typedefs */
17 #define NSTRUCTS 512 /* number of structs */
18 #define NFIELDS 128 /* number of fields in structs */
19 #define NARRAYS 1024 /* number of arrays */
20 #define NLABELS 1024 /* number of labels p.f. */
21 #define NAMELEN 128 /* size of identifiers */
22 #define NDEFS 1024 /* number of macros */
23 #define MACROLEN 1024 /* size of macros arguments/definitions */
24 #define NBUFS 32 /* macro expansion stack depth */
25 #define NLOCS 1024 /* number of header search paths */
27 #define LEN(a) (sizeof(a) / sizeof((a)[0]))