4 /* Rather than play elaborate and complicated games with
5 * platform-dependent endianness headers, just detect the platforms we
6 * support. This list is simpler and smaller, yet still quite
8 #if (defined(__x86_64) && defined(__linux__)) || defined(__sparcv9) || \
10 /* Win64 and Irix should work with this too, but have not been
13 #elif defined(_M_IX86) || defined(i386) || defined(__x86_64) || \
14 defined(__ia64__) || defined(_M_IA64) || defined(__ARMEL__)
16 #elif defined(__sparc) || defined(__ppc__) || defined(__PPC) || \
17 defined(__mips) || defined(__ARMEB__)
20 # error Unrecognized CPU architecture
30 struct naCCode* ccode;
31 struct naGhost* ghost;
34 /* On supported 64 bit platforms (those where all memory returned from
35 * naAlloc() is guaranteed to lie between 0 and 2^48-1) we union the
36 * double with the pointer, and use fancy tricks (see data.h) to make
37 * sure all pointers are stored as NaNs. 32 bit layouts (and 64 bit
38 * platforms where we haven't tested the trick above) need
39 * endianness-dependent ordering to make sure that the reftag lies in
40 * the top bits of the double */
43 typedef struct { naPtr ptr; int reftag; } naRefPart;
44 #elif defined(NASAL_BE)
45 typedef struct { int reftag; naPtr ptr; } naRefPart;
48 #if defined(NASAL_NAN64)
49 typedef union { double num; void* ptr; } naRef;
51 typedef union { double num; naRefPart ref; } naRef;