1 /* This file is constructed from the output of genarch for each 2 of the relevant platforms. 3 */ 4 #if defined(__ppc__) && __ppc__ == 1 5 /* ---------------- Scalar alignments ---------------- */ 6 7 #define ARCH_ALIGN_SHORT_MOD 2 8 #define ARCH_ALIGN_INT_MOD 4 9 #define ARCH_ALIGN_LONG_MOD 4 10 #define ARCH_ALIGN_SIZE_T_MOD 4 11 #define ARCH_ALIGN_PTR_MOD 4 12 #define ARCH_ALIGN_FLOAT_MOD 4 13 #define ARCH_ALIGN_DOUBLE_MOD 4 14 15 /* ---------------- Scalar sizes ---------------- */ 16 17 #define ARCH_LOG2_SIZEOF_CHAR 0 18 #define ARCH_LOG2_SIZEOF_SHORT 1 19 #define ARCH_LOG2_SIZEOF_INT 2 20 #define ARCH_LOG2_SIZEOF_LONG 2 21 #define ARCH_LOG2_SIZEOF_SIZE_T 2 22 #define ARCH_LOG2_SIZEOF_LONG_LONG 3 23 #define ARCH_SIZEOF_SIZET 4 24 25 #ifndef ARCH_SIZEOF_GX_COLOR_INDEX 26 #define ARCH_SIZEOF_GX_COLOR_INDEX 8 27 #endif 28 29 #define ARCH_SIZEOF_PTR 4 30 #define ARCH_SIZEOF_FLOAT 4 31 #define ARCH_SIZEOF_DOUBLE 8 32 #define ARCH_FLOAT_MANTISSA_BITS 24 33 #define ARCH_DOUBLE_MANTISSA_BITS 53 34 35 /* ---------------- Unsigned max values ---------------- */ 36 37 #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) 38 #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) 39 #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) 40 #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) 41 #define ARCH_MAX_SIZE_T ((size_t)~0L + (size_t)0) 42 43 /* ---------------- Miscellaneous ---------------- */ 44 45 #define ARCH_IS_BIG_ENDIAN 1 46 #define ARCH_PTRS_ARE_SIGNED 0 47 #define ARCH_FLOATS_ARE_IEEE 1 48 #define ARCH_ARITH_RSHIFT 2 49 #define ARCH_DIV_NEG_POS_TRUNCATES 1 50 51 #else /* defined(__ppc__) && __ppc__ == 1 */ 52 53 #if defined(__LP64__) && __LP64__ == 1 54 55 /* ---------------- Scalar alignments ---------------- */ 56 57 #define ARCH_ALIGN_SHORT_MOD 2 58 #define ARCH_ALIGN_INT_MOD 4 59 #define ARCH_ALIGN_LONG_MOD 8 60 #define ARCH_ALIGN_SIZE_T_MOD 8 61 #define ARCH_ALIGN_PTR_MOD 8 62 #define ARCH_ALIGN_FLOAT_MOD 4 63 #define ARCH_ALIGN_DOUBLE_MOD 8 64 65 /* ---------------- Scalar sizes ---------------- */ 66 67 #define ARCH_LOG2_SIZEOF_CHAR 0 68 #define ARCH_LOG2_SIZEOF_SHORT 1 69 #define ARCH_LOG2_SIZEOF_INT 2 70 #define ARCH_LOG2_SIZEOF_LONG 3 71 #define ARCH_LOG2_SIZEOF_SIZE_T 3 72 #define ARCH_LOG2_SIZEOF_LONG_LONG 3 73 #define ARCH_SIZEOF_SIZE_T 8 74 75 #ifndef ARCH_SIZEOF_GX_COLOR_INDEX 76 #define ARCH_SIZEOF_GX_COLOR_INDEX 8 77 #endif 78 79 #define ARCH_SIZEOF_PTR 8 80 #define ARCH_SIZEOF_FLOAT 4 81 #define ARCH_SIZEOF_DOUBLE 8 82 #define ARCH_FLOAT_MANTISSA_BITS 24 83 #define ARCH_DOUBLE_MANTISSA_BITS 53 84 85 /* ---------------- Unsigned max values ---------------- */ 86 87 #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) 88 #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) 89 #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) 90 #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) 91 #define ARCH_MAX_SIZE_T ((size_t)~0L + (size_t)0) 92 93 /* ---------------- Miscellaneous ---------------- */ 94 95 #define ARCH_IS_BIG_ENDIAN 0 96 #define ARCH_PTRS_ARE_SIGNED 0 97 #define ARCH_FLOATS_ARE_IEEE 1 98 #define ARCH_ARITH_RSHIFT 2 99 #define ARCH_DIV_NEG_POS_TRUNCATES 1 100 101 #else /* defined(__LP64__) && __LP64__ == 1 */ 102 /* ---------------- Scalar alignments ---------------- */ 103 104 #define ARCH_ALIGN_SHORT_MOD 2 105 #define ARCH_ALIGN_INT_MOD 4 106 #define ARCH_ALIGN_LONG_MOD 4 107 #define ARCH_ALIGN_SIZE_T_MOD 4 108 #define ARCH_ALIGN_PTR_MOD 4 109 #define ARCH_ALIGN_FLOAT_MOD 4 110 #define ARCH_ALIGN_DOUBLE_MOD 4 111 112 /* ---------------- Scalar sizes ---------------- */ 113 114 #define ARCH_LOG2_SIZEOF_CHAR 0 115 #define ARCH_LOG2_SIZEOF_SHORT 1 116 #define ARCH_LOG2_SIZEOF_INT 2 117 #define ARCH_LOG2_SIZEOF_LONG 2 118 #define ARCH_LOG2_SIZEOF_SIZE_T 2 119 #define ARCH_LOG2_SIZEOF_LONG_LONG 3 120 #define ARCH_SIZEOF_SIZE_T 4 121 122 #ifndef ARCH_SIZEOF_GX_COLOR_INDEX 123 #define ARCH_SIZEOF_GX_COLOR_INDEX 8 124 #endif 125 126 #define ARCH_SIZEOF_PTR 4 127 #define ARCH_SIZEOF_FLOAT 4 128 #define ARCH_SIZEOF_DOUBLE 8 129 #define ARCH_FLOAT_MANTISSA_BITS 24 130 #define ARCH_DOUBLE_MANTISSA_BITS 53 131 132 /* ---------------- Unsigned max values ---------------- */ 133 134 #define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0) 135 #define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0) 136 #define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0) 137 #define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0) 138 #define ARCH_MAX_SIZE_T ((size_t)~0L + (size_t)0) 139 140 /* ---------------- Miscellaneous ---------------- */ 141 142 #define ARCH_IS_BIG_ENDIAN 0 143 #define ARCH_PTRS_ARE_SIGNED 0 144 #define ARCH_FLOATS_ARE_IEEE 1 145 #define ARCH_ARITH_RSHIFT 2 146 #define ARCH_DIV_NEG_POS_TRUNCATES 1 147 148 #endif /* defined(__LP64__) && __LP64__ == 1 */ 149 150 #endif /* defined(__ppc__) && __ppc__ == 1 */ 151