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)
9 /* Win64 and Irix should work with this too, but have not been
12 #elif defined(_M_IX86) || defined(i386) || defined(__x86_64) || \
13 defined(__ia64__) || defined(_M_IA64) || defined(__ARMEL__)
15 #elif defined(__sparc) || defined(__ppc__) ||defined(__PPC) || \
16 defined(__mips) || defined(__ARMEB__)
19 # error Unrecognized CPU architecture
29 struct naCCode* ccode;
30 struct naGhost* ghost;
33 #if defined(NASAL_NAN64)
35 /* On suppoted 64 bit platforms (those where all memory returned from
36 * naAlloc() is guaranteed to lie between 0 and 2^48-1) we union the
37 * double with the pointer, and use fancy tricks (see data.h) to make
38 * sure all pointers are stored as NaNs. */
39 typedef union { double num; void* ptr; } naRef;
41 #elif defined(NASAL_LE) || defined(NASAL_BE)
43 /* 32 bit layouts (and 64 bit platforms where we haven't tested the
44 trick above) need endianness-dependent ordering to make sure that
45 the reftag lies in the top bits of the double */
47 typedef struct { naPtr ptr; int reftag; } naRefPart;
49 typedef struct { int reftag; naPtr ptr; } naRefPart;