1 #ifndef ARCH_H
2 #define ARCH_H
3 
4 /* Integer Multi-Dimensional Interpolation */
5 /*
6  * Copyright 2000 Graeme W. Gill
7  *
8  * This material is licenced under the GNU GENERAL PUBLIC LICENCE :-
9  * see the Licence.txt file for licencing details.
10  */
11 
12 #define STR_DEF(def)  #def
13 
14 #ifdef ALLOW64
15 
16 /* Detect machine/compiler specifics here */
17 #if defined(NT) || defined(__WIN32__)
18 #define longlong __int64
19 #else	/* !NT, assume standard */
20 #define longlong long long
21 #endif	/* !NT */
22 #define str_longlong STR_DEF(longlong)
23 
24 #endif /* ALLOW64 */
25 
26 
27 
28 /* Machine/Language architectural specifications */
29 typedef struct {
30 	int bits;		/* Bits in this data type */
31 	char *name;		/* Name used to specify this type */
32 	int align;		/* Non-zero if this type should be accessed aligned */
33 } dtypes;
34 
35 #define MXDTYPES 6
36 
37 typedef struct {
38 	int bigend;		/* Non-zero if this is a bigendian architecture */
39 	int uwa;		/* Use wide memory access */
40 
41 	int    pbits;	/* Number of bits in a pointer */
42 
43 	int    nords;	/* Number of ord types */
44 	dtypes ords[MXDTYPES];		/* Ordinal types, in size order */
45 	int    natord;	/* Index of natural machine ordinal */
46 
47 	int    nints;	/* Number of int types */
48 	dtypes ints[MXDTYPES];		/* Integer types, in size order */
49 	int    natint;	/* Index of natural machine integer */
50 
51 	/* Optimisation settings */
52 	int    shfm;	/* Non-zero to use shifts for masking */
53 	int    oscale;	/* Maximum power of 2 scaled indexing mode, 0 for none. */
54 	int    smmul;	/* Has fast small multiply for index scaling */
55 
56 } mach_arch;
57 
58 #endif /* ARCH_H */
59