| OLD | NEW |
| (Empty) |
| 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | |
| 2 /* This Source Code Form is subject to the terms of the Mozilla Public | |
| 3 * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 5 | |
| 6 /* | |
| 7 * This file is used by not only Linux but also other glibc systems | |
| 8 * such as GNU/Hurd and GNU/k*BSD. | |
| 9 */ | |
| 10 | |
| 11 #ifndef nspr_cpucfg___ | |
| 12 #define nspr_cpucfg___ | |
| 13 | |
| 14 #ifndef XP_UNIX | |
| 15 #define XP_UNIX | |
| 16 #endif | |
| 17 | |
| 18 #if !defined(LINUX) && defined(__linux__) | |
| 19 #define LINUX | |
| 20 #endif | |
| 21 | |
| 22 #ifdef __FreeBSD_kernel__ | |
| 23 #define PR_AF_INET6 28 /* same as AF_INET6 */ | |
| 24 #elif defined(__GNU__) | |
| 25 #define PR_AF_INET6 26 /* same as AF_INET6 */ | |
| 26 #else | |
| 27 #define PR_AF_INET6 10 /* same as AF_INET6 */ | |
| 28 #endif | |
| 29 | |
| 30 #ifdef __powerpc64__ | |
| 31 | |
| 32 #undef IS_LITTLE_ENDIAN | |
| 33 #define IS_BIG_ENDIAN 1 | |
| 34 #define IS_64 | |
| 35 | |
| 36 #define PR_BYTES_PER_BYTE 1 | |
| 37 #define PR_BYTES_PER_SHORT 2 | |
| 38 #define PR_BYTES_PER_INT 4 | |
| 39 #define PR_BYTES_PER_INT64 8 | |
| 40 #define PR_BYTES_PER_LONG 8 | |
| 41 #define PR_BYTES_PER_FLOAT 4 | |
| 42 #define PR_BYTES_PER_DOUBLE 8 | |
| 43 #define PR_BYTES_PER_WORD 8 | |
| 44 #define PR_BYTES_PER_DWORD 8 | |
| 45 | |
| 46 #define PR_BITS_PER_BYTE 8 | |
| 47 #define PR_BITS_PER_SHORT 16 | |
| 48 #define PR_BITS_PER_INT 32 | |
| 49 #define PR_BITS_PER_INT64 64 | |
| 50 #define PR_BITS_PER_LONG 64 | |
| 51 #define PR_BITS_PER_FLOAT 32 | |
| 52 #define PR_BITS_PER_DOUBLE 64 | |
| 53 #define PR_BITS_PER_WORD 64 | |
| 54 | |
| 55 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 56 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 57 #define PR_BITS_PER_INT_LOG2 5 | |
| 58 #define PR_BITS_PER_INT64_LOG2 6 | |
| 59 #define PR_BITS_PER_LONG_LOG2 6 | |
| 60 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 61 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 62 #define PR_BITS_PER_WORD_LOG2 6 | |
| 63 | |
| 64 #define PR_ALIGN_OF_SHORT 2 | |
| 65 #define PR_ALIGN_OF_INT 4 | |
| 66 #define PR_ALIGN_OF_LONG 8 | |
| 67 #define PR_ALIGN_OF_INT64 8 | |
| 68 #define PR_ALIGN_OF_FLOAT 4 | |
| 69 #define PR_ALIGN_OF_DOUBLE 8 | |
| 70 #define PR_ALIGN_OF_POINTER 8 | |
| 71 #define PR_ALIGN_OF_WORD 8 | |
| 72 | |
| 73 #define PR_BYTES_PER_WORD_LOG2 3 | |
| 74 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 75 | |
| 76 #elif defined(__powerpc__) | |
| 77 | |
| 78 #undef IS_LITTLE_ENDIAN | |
| 79 #define IS_BIG_ENDIAN 1 | |
| 80 | |
| 81 #define PR_BYTES_PER_BYTE 1 | |
| 82 #define PR_BYTES_PER_SHORT 2 | |
| 83 #define PR_BYTES_PER_INT 4 | |
| 84 #define PR_BYTES_PER_INT64 8 | |
| 85 #define PR_BYTES_PER_LONG 4 | |
| 86 #define PR_BYTES_PER_FLOAT 4 | |
| 87 #define PR_BYTES_PER_DOUBLE 8 | |
| 88 #define PR_BYTES_PER_WORD 4 | |
| 89 #define PR_BYTES_PER_DWORD 8 | |
| 90 | |
| 91 #define PR_BITS_PER_BYTE 8 | |
| 92 #define PR_BITS_PER_SHORT 16 | |
| 93 #define PR_BITS_PER_INT 32 | |
| 94 #define PR_BITS_PER_INT64 64 | |
| 95 #define PR_BITS_PER_LONG 32 | |
| 96 #define PR_BITS_PER_FLOAT 32 | |
| 97 #define PR_BITS_PER_DOUBLE 64 | |
| 98 #define PR_BITS_PER_WORD 32 | |
| 99 | |
| 100 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 101 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 102 #define PR_BITS_PER_INT_LOG2 5 | |
| 103 #define PR_BITS_PER_INT64_LOG2 6 | |
| 104 #define PR_BITS_PER_LONG_LOG2 5 | |
| 105 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 106 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 107 #define PR_BITS_PER_WORD_LOG2 5 | |
| 108 | |
| 109 #define PR_ALIGN_OF_SHORT 2 | |
| 110 #define PR_ALIGN_OF_INT 4 | |
| 111 #define PR_ALIGN_OF_LONG 4 | |
| 112 #define PR_ALIGN_OF_INT64 8 | |
| 113 #define PR_ALIGN_OF_FLOAT 4 | |
| 114 #define PR_ALIGN_OF_DOUBLE 8 | |
| 115 #define PR_ALIGN_OF_POINTER 4 | |
| 116 #define PR_ALIGN_OF_WORD 4 | |
| 117 | |
| 118 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 119 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 120 | |
| 121 #elif defined(__alpha) | |
| 122 | |
| 123 #define IS_LITTLE_ENDIAN 1 | |
| 124 #undef IS_BIG_ENDIAN | |
| 125 #define IS_64 | |
| 126 | |
| 127 #define PR_BYTES_PER_BYTE 1 | |
| 128 #define PR_BYTES_PER_SHORT 2 | |
| 129 #define PR_BYTES_PER_INT 4 | |
| 130 #define PR_BYTES_PER_INT64 8 | |
| 131 #define PR_BYTES_PER_LONG 8 | |
| 132 #define PR_BYTES_PER_FLOAT 4 | |
| 133 #define PR_BYTES_PER_DOUBLE 8 | |
| 134 #define PR_BYTES_PER_WORD 8 | |
| 135 #define PR_BYTES_PER_DWORD 8 | |
| 136 | |
| 137 #define PR_BITS_PER_BYTE 8 | |
| 138 #define PR_BITS_PER_SHORT 16 | |
| 139 #define PR_BITS_PER_INT 32 | |
| 140 #define PR_BITS_PER_INT64 64 | |
| 141 #define PR_BITS_PER_LONG 64 | |
| 142 #define PR_BITS_PER_FLOAT 32 | |
| 143 #define PR_BITS_PER_DOUBLE 64 | |
| 144 #define PR_BITS_PER_WORD 64 | |
| 145 | |
| 146 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 147 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 148 #define PR_BITS_PER_INT_LOG2 5 | |
| 149 #define PR_BITS_PER_INT64_LOG2 6 | |
| 150 #define PR_BITS_PER_LONG_LOG2 6 | |
| 151 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 152 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 153 #define PR_BITS_PER_WORD_LOG2 6 | |
| 154 | |
| 155 #define PR_ALIGN_OF_SHORT 2 | |
| 156 #define PR_ALIGN_OF_INT 4 | |
| 157 #define PR_ALIGN_OF_LONG 8 | |
| 158 #define PR_ALIGN_OF_INT64 8 | |
| 159 #define PR_ALIGN_OF_FLOAT 4 | |
| 160 #define PR_ALIGN_OF_DOUBLE 8 | |
| 161 #define PR_ALIGN_OF_POINTER 8 | |
| 162 #define PR_ALIGN_OF_WORD 8 | |
| 163 | |
| 164 #define PR_BYTES_PER_WORD_LOG2 3 | |
| 165 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 166 | |
| 167 #elif defined(__ia64__) | |
| 168 | |
| 169 #define IS_LITTLE_ENDIAN 1 | |
| 170 #undef IS_BIG_ENDIAN | |
| 171 #define IS_64 | |
| 172 | |
| 173 #define PR_BYTES_PER_BYTE 1 | |
| 174 #define PR_BYTES_PER_SHORT 2 | |
| 175 #define PR_BYTES_PER_INT 4 | |
| 176 #define PR_BYTES_PER_INT64 8 | |
| 177 #define PR_BYTES_PER_LONG 8 | |
| 178 #define PR_BYTES_PER_FLOAT 4 | |
| 179 #define PR_BYTES_PER_DOUBLE 8 | |
| 180 #define PR_BYTES_PER_WORD 8 | |
| 181 #define PR_BYTES_PER_DWORD 8 | |
| 182 | |
| 183 #define PR_BITS_PER_BYTE 8 | |
| 184 #define PR_BITS_PER_SHORT 16 | |
| 185 #define PR_BITS_PER_INT 32 | |
| 186 #define PR_BITS_PER_INT64 64 | |
| 187 #define PR_BITS_PER_LONG 64 | |
| 188 #define PR_BITS_PER_FLOAT 32 | |
| 189 #define PR_BITS_PER_DOUBLE 64 | |
| 190 #define PR_BITS_PER_WORD 64 | |
| 191 | |
| 192 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 193 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 194 #define PR_BITS_PER_INT_LOG2 5 | |
| 195 #define PR_BITS_PER_INT64_LOG2 6 | |
| 196 #define PR_BITS_PER_LONG_LOG2 6 | |
| 197 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 198 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 199 #define PR_BITS_PER_WORD_LOG2 6 | |
| 200 | |
| 201 #define PR_ALIGN_OF_SHORT 2 | |
| 202 #define PR_ALIGN_OF_INT 4 | |
| 203 #define PR_ALIGN_OF_LONG 8 | |
| 204 #define PR_ALIGN_OF_INT64 8 | |
| 205 #define PR_ALIGN_OF_FLOAT 4 | |
| 206 #define PR_ALIGN_OF_DOUBLE 8 | |
| 207 #define PR_ALIGN_OF_POINTER 8 | |
| 208 #define PR_ALIGN_OF_WORD 8 | |
| 209 | |
| 210 #define PR_BYTES_PER_WORD_LOG2 3 | |
| 211 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 212 | |
| 213 #elif defined(__x86_64__) | |
| 214 | |
| 215 #ifdef __ILP32__ | |
| 216 | |
| 217 #define IS_LITTLE_ENDIAN 1 | |
| 218 #undef IS_BIG_ENDIAN | |
| 219 | |
| 220 #define PR_BYTES_PER_BYTE 1 | |
| 221 #define PR_BYTES_PER_SHORT 2 | |
| 222 #define PR_BYTES_PER_INT 4 | |
| 223 #define PR_BYTES_PER_INT64 8 | |
| 224 #define PR_BYTES_PER_LONG 4 | |
| 225 #define PR_BYTES_PER_FLOAT 4 | |
| 226 #define PR_BYTES_PER_DOUBLE 8 | |
| 227 #define PR_BYTES_PER_WORD 4 | |
| 228 #define PR_BYTES_PER_DWORD 8 | |
| 229 | |
| 230 #define PR_BITS_PER_BYTE 8 | |
| 231 #define PR_BITS_PER_SHORT 16 | |
| 232 #define PR_BITS_PER_INT 32 | |
| 233 #define PR_BITS_PER_INT64 64 | |
| 234 #define PR_BITS_PER_LONG 32 | |
| 235 #define PR_BITS_PER_FLOAT 32 | |
| 236 #define PR_BITS_PER_DOUBLE 64 | |
| 237 #define PR_BITS_PER_WORD 32 | |
| 238 | |
| 239 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 240 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 241 #define PR_BITS_PER_INT_LOG2 5 | |
| 242 #define PR_BITS_PER_INT64_LOG2 6 | |
| 243 #define PR_BITS_PER_LONG_LOG2 5 | |
| 244 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 245 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 246 #define PR_BITS_PER_WORD_LOG2 5 | |
| 247 | |
| 248 #define PR_ALIGN_OF_SHORT 2 | |
| 249 #define PR_ALIGN_OF_INT 4 | |
| 250 #define PR_ALIGN_OF_LONG 4 | |
| 251 #define PR_ALIGN_OF_INT64 4 | |
| 252 #define PR_ALIGN_OF_FLOAT 4 | |
| 253 #define PR_ALIGN_OF_DOUBLE 4 | |
| 254 #define PR_ALIGN_OF_POINTER 4 | |
| 255 #define PR_ALIGN_OF_WORD 4 | |
| 256 | |
| 257 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 258 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 259 | |
| 260 #else | |
| 261 | |
| 262 #define IS_LITTLE_ENDIAN 1 | |
| 263 #undef IS_BIG_ENDIAN | |
| 264 #define IS_64 | |
| 265 | |
| 266 #define PR_BYTES_PER_BYTE 1 | |
| 267 #define PR_BYTES_PER_SHORT 2 | |
| 268 #define PR_BYTES_PER_INT 4 | |
| 269 #define PR_BYTES_PER_INT64 8 | |
| 270 #define PR_BYTES_PER_LONG 8 | |
| 271 #define PR_BYTES_PER_FLOAT 4 | |
| 272 #define PR_BYTES_PER_DOUBLE 8 | |
| 273 #define PR_BYTES_PER_WORD 8 | |
| 274 #define PR_BYTES_PER_DWORD 8 | |
| 275 | |
| 276 #define PR_BITS_PER_BYTE 8 | |
| 277 #define PR_BITS_PER_SHORT 16 | |
| 278 #define PR_BITS_PER_INT 32 | |
| 279 #define PR_BITS_PER_INT64 64 | |
| 280 #define PR_BITS_PER_LONG 64 | |
| 281 #define PR_BITS_PER_FLOAT 32 | |
| 282 #define PR_BITS_PER_DOUBLE 64 | |
| 283 #define PR_BITS_PER_WORD 64 | |
| 284 | |
| 285 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 286 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 287 #define PR_BITS_PER_INT_LOG2 5 | |
| 288 #define PR_BITS_PER_INT64_LOG2 6 | |
| 289 #define PR_BITS_PER_LONG_LOG2 6 | |
| 290 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 291 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 292 #define PR_BITS_PER_WORD_LOG2 6 | |
| 293 | |
| 294 #define PR_ALIGN_OF_SHORT 2 | |
| 295 #define PR_ALIGN_OF_INT 4 | |
| 296 #define PR_ALIGN_OF_LONG 8 | |
| 297 #define PR_ALIGN_OF_INT64 8 | |
| 298 #define PR_ALIGN_OF_FLOAT 4 | |
| 299 #define PR_ALIGN_OF_DOUBLE 8 | |
| 300 #define PR_ALIGN_OF_POINTER 8 | |
| 301 #define PR_ALIGN_OF_WORD 8 | |
| 302 | |
| 303 #define PR_BYTES_PER_WORD_LOG2 3 | |
| 304 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 305 | |
| 306 #endif | |
| 307 | |
| 308 #elif defined(__mc68000__) | |
| 309 | |
| 310 #undef IS_LITTLE_ENDIAN | |
| 311 #define IS_BIG_ENDIAN 1 | |
| 312 | |
| 313 #define PR_BYTES_PER_BYTE 1 | |
| 314 #define PR_BYTES_PER_SHORT 2 | |
| 315 #define PR_BYTES_PER_INT 4 | |
| 316 #define PR_BYTES_PER_INT64 8 | |
| 317 #define PR_BYTES_PER_LONG 4 | |
| 318 #define PR_BYTES_PER_FLOAT 4 | |
| 319 #define PR_BYTES_PER_DOUBLE 8 | |
| 320 #define PR_BYTES_PER_WORD 4 | |
| 321 #define PR_BYTES_PER_DWORD 8 | |
| 322 | |
| 323 #define PR_BITS_PER_BYTE 8 | |
| 324 #define PR_BITS_PER_SHORT 16 | |
| 325 #define PR_BITS_PER_INT 32 | |
| 326 #define PR_BITS_PER_INT64 64 | |
| 327 #define PR_BITS_PER_LONG 32 | |
| 328 #define PR_BITS_PER_FLOAT 32 | |
| 329 #define PR_BITS_PER_DOUBLE 64 | |
| 330 #define PR_BITS_PER_WORD 32 | |
| 331 | |
| 332 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 333 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 334 #define PR_BITS_PER_INT_LOG2 5 | |
| 335 #define PR_BITS_PER_INT64_LOG2 6 | |
| 336 #define PR_BITS_PER_LONG_LOG2 5 | |
| 337 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 338 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 339 #define PR_BITS_PER_WORD_LOG2 5 | |
| 340 | |
| 341 #define PR_ALIGN_OF_SHORT 2 | |
| 342 #define PR_ALIGN_OF_INT 2 | |
| 343 #define PR_ALIGN_OF_LONG 2 | |
| 344 #define PR_ALIGN_OF_INT64 2 | |
| 345 #define PR_ALIGN_OF_FLOAT 2 | |
| 346 #define PR_ALIGN_OF_DOUBLE 2 | |
| 347 #define PR_ALIGN_OF_POINTER 2 | |
| 348 #define PR_ALIGN_OF_WORD 2 | |
| 349 | |
| 350 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 351 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 352 | |
| 353 #elif defined(__sparc__) && defined (__arch64__) | |
| 354 | |
| 355 #undef IS_LITTLE_ENDIAN | |
| 356 #define IS_BIG_ENDIAN 1 | |
| 357 #define IS_64 | |
| 358 | |
| 359 #define PR_BYTES_PER_BYTE 1 | |
| 360 #define PR_BYTES_PER_SHORT 2 | |
| 361 #define PR_BYTES_PER_INT 4 | |
| 362 #define PR_BYTES_PER_INT64 8 | |
| 363 #define PR_BYTES_PER_LONG 8 | |
| 364 #define PR_BYTES_PER_FLOAT 4 | |
| 365 #define PR_BYTES_PER_DOUBLE 8 | |
| 366 #define PR_BYTES_PER_WORD 8 | |
| 367 #define PR_BYTES_PER_DWORD 8 | |
| 368 | |
| 369 #define PR_BITS_PER_BYTE 8 | |
| 370 #define PR_BITS_PER_SHORT 16 | |
| 371 #define PR_BITS_PER_INT 32 | |
| 372 #define PR_BITS_PER_INT64 64 | |
| 373 #define PR_BITS_PER_LONG 64 | |
| 374 #define PR_BITS_PER_FLOAT 32 | |
| 375 #define PR_BITS_PER_DOUBLE 64 | |
| 376 #define PR_BITS_PER_WORD 64 | |
| 377 | |
| 378 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 379 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 380 #define PR_BITS_PER_INT_LOG2 5 | |
| 381 #define PR_BITS_PER_INT64_LOG2 6 | |
| 382 #define PR_BITS_PER_LONG_LOG2 6 | |
| 383 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 384 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 385 #define PR_BITS_PER_WORD_LOG2 6 | |
| 386 | |
| 387 #define PR_ALIGN_OF_SHORT 2 | |
| 388 #define PR_ALIGN_OF_INT 4 | |
| 389 #define PR_ALIGN_OF_INT64 8 | |
| 390 #define PR_ALIGN_OF_LONG 8 | |
| 391 #define PR_ALIGN_OF_FLOAT 4 | |
| 392 #define PR_ALIGN_OF_DOUBLE 8 | |
| 393 #define PR_ALIGN_OF_POINTER 8 | |
| 394 #define PR_ALIGN_OF_WORD 8 | |
| 395 | |
| 396 #define PR_BYTES_PER_WORD_LOG2 3 | |
| 397 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 398 | |
| 399 #elif defined(__sparc__) | |
| 400 | |
| 401 #undef IS_LITTLE_ENDIAN | |
| 402 #define IS_BIG_ENDIAN 1 | |
| 403 | |
| 404 #define PR_BYTES_PER_BYTE 1 | |
| 405 #define PR_BYTES_PER_SHORT 2 | |
| 406 #define PR_BYTES_PER_INT 4 | |
| 407 #define PR_BYTES_PER_INT64 8 | |
| 408 #define PR_BYTES_PER_LONG 4 | |
| 409 #define PR_BYTES_PER_FLOAT 4 | |
| 410 #define PR_BYTES_PER_DOUBLE 8 | |
| 411 #define PR_BYTES_PER_WORD 4 | |
| 412 #define PR_BYTES_PER_DWORD 8 | |
| 413 | |
| 414 #define PR_BITS_PER_BYTE 8 | |
| 415 #define PR_BITS_PER_SHORT 16 | |
| 416 #define PR_BITS_PER_INT 32 | |
| 417 #define PR_BITS_PER_INT64 64 | |
| 418 #define PR_BITS_PER_LONG 32 | |
| 419 #define PR_BITS_PER_FLOAT 32 | |
| 420 #define PR_BITS_PER_DOUBLE 64 | |
| 421 #define PR_BITS_PER_WORD 32 | |
| 422 | |
| 423 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 424 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 425 #define PR_BITS_PER_INT_LOG2 5 | |
| 426 #define PR_BITS_PER_INT64_LOG2 6 | |
| 427 #define PR_BITS_PER_LONG_LOG2 5 | |
| 428 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 429 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 430 #define PR_BITS_PER_WORD_LOG2 5 | |
| 431 | |
| 432 #define PR_ALIGN_OF_SHORT 2 | |
| 433 #define PR_ALIGN_OF_INT 4 | |
| 434 #define PR_ALIGN_OF_LONG 4 | |
| 435 #define PR_ALIGN_OF_INT64 8 | |
| 436 #define PR_ALIGN_OF_FLOAT 4 | |
| 437 #define PR_ALIGN_OF_DOUBLE 8 | |
| 438 #define PR_ALIGN_OF_POINTER 4 | |
| 439 #define PR_ALIGN_OF_WORD 4 | |
| 440 | |
| 441 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 442 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 443 | |
| 444 #elif defined(__i386__) | |
| 445 | |
| 446 #define IS_LITTLE_ENDIAN 1 | |
| 447 #undef IS_BIG_ENDIAN | |
| 448 | |
| 449 #define PR_BYTES_PER_BYTE 1 | |
| 450 #define PR_BYTES_PER_SHORT 2 | |
| 451 #define PR_BYTES_PER_INT 4 | |
| 452 #define PR_BYTES_PER_INT64 8 | |
| 453 #define PR_BYTES_PER_LONG 4 | |
| 454 #define PR_BYTES_PER_FLOAT 4 | |
| 455 #define PR_BYTES_PER_DOUBLE 8 | |
| 456 #define PR_BYTES_PER_WORD 4 | |
| 457 #define PR_BYTES_PER_DWORD 8 | |
| 458 | |
| 459 #define PR_BITS_PER_BYTE 8 | |
| 460 #define PR_BITS_PER_SHORT 16 | |
| 461 #define PR_BITS_PER_INT 32 | |
| 462 #define PR_BITS_PER_INT64 64 | |
| 463 #define PR_BITS_PER_LONG 32 | |
| 464 #define PR_BITS_PER_FLOAT 32 | |
| 465 #define PR_BITS_PER_DOUBLE 64 | |
| 466 #define PR_BITS_PER_WORD 32 | |
| 467 | |
| 468 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 469 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 470 #define PR_BITS_PER_INT_LOG2 5 | |
| 471 #define PR_BITS_PER_INT64_LOG2 6 | |
| 472 #define PR_BITS_PER_LONG_LOG2 5 | |
| 473 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 474 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 475 #define PR_BITS_PER_WORD_LOG2 5 | |
| 476 | |
| 477 #define PR_ALIGN_OF_SHORT 2 | |
| 478 #define PR_ALIGN_OF_INT 4 | |
| 479 #define PR_ALIGN_OF_LONG 4 | |
| 480 #define PR_ALIGN_OF_INT64 4 | |
| 481 #define PR_ALIGN_OF_FLOAT 4 | |
| 482 #define PR_ALIGN_OF_DOUBLE 4 | |
| 483 #define PR_ALIGN_OF_POINTER 4 | |
| 484 #define PR_ALIGN_OF_WORD 4 | |
| 485 | |
| 486 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 487 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 488 | |
| 489 #elif defined(__mips__) | |
| 490 | |
| 491 #ifdef __MIPSEB__ | |
| 492 #define IS_BIG_ENDIAN 1 | |
| 493 #undef IS_LITTLE_ENDIAN | |
| 494 #elif defined(__MIPSEL__) | |
| 495 #define IS_LITTLE_ENDIAN 1 | |
| 496 #undef IS_BIG_ENDIAN | |
| 497 #else | |
| 498 #error "Unknown MIPS endianness." | |
| 499 #endif | |
| 500 | |
| 501 #define PR_BYTES_PER_BYTE 1 | |
| 502 #define PR_BYTES_PER_SHORT 2 | |
| 503 #define PR_BYTES_PER_INT 4 | |
| 504 #define PR_BYTES_PER_INT64 8 | |
| 505 #define PR_BYTES_PER_LONG 4 | |
| 506 #define PR_BYTES_PER_FLOAT 4 | |
| 507 #define PR_BYTES_PER_DOUBLE 8 | |
| 508 #define PR_BYTES_PER_WORD 4 | |
| 509 #define PR_BYTES_PER_DWORD 8 | |
| 510 | |
| 511 #define PR_BITS_PER_BYTE 8 | |
| 512 #define PR_BITS_PER_SHORT 16 | |
| 513 #define PR_BITS_PER_INT 32 | |
| 514 #define PR_BITS_PER_INT64 64 | |
| 515 #define PR_BITS_PER_LONG 32 | |
| 516 #define PR_BITS_PER_FLOAT 32 | |
| 517 #define PR_BITS_PER_DOUBLE 64 | |
| 518 #define PR_BITS_PER_WORD 32 | |
| 519 | |
| 520 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 521 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 522 #define PR_BITS_PER_INT_LOG2 5 | |
| 523 #define PR_BITS_PER_INT64_LOG2 6 | |
| 524 #define PR_BITS_PER_LONG_LOG2 5 | |
| 525 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 526 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 527 #define PR_BITS_PER_WORD_LOG2 5 | |
| 528 | |
| 529 #define PR_ALIGN_OF_SHORT 2 | |
| 530 #define PR_ALIGN_OF_INT 4 | |
| 531 #define PR_ALIGN_OF_LONG 4 | |
| 532 #define PR_ALIGN_OF_INT64 8 | |
| 533 #define PR_ALIGN_OF_FLOAT 4 | |
| 534 #define PR_ALIGN_OF_DOUBLE 8 | |
| 535 #define PR_ALIGN_OF_POINTER 4 | |
| 536 #define PR_ALIGN_OF_WORD 4 | |
| 537 | |
| 538 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 539 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 540 | |
| 541 #elif defined(__arm__) | |
| 542 | |
| 543 #ifdef __ARMEB__ | |
| 544 #undef IS_LITTLE_ENDIAN | |
| 545 #define IS_BIG_ENDIAN 1 | |
| 546 #elif defined(__ARMEL__) | |
| 547 #define IS_LITTLE_ENDIAN 1 | |
| 548 #undef IS_BIG_ENDIAN | |
| 549 #else | |
| 550 #error "Unknown ARM endianness." | |
| 551 #endif | |
| 552 | |
| 553 #define PR_BYTES_PER_BYTE 1 | |
| 554 #define PR_BYTES_PER_SHORT 2 | |
| 555 #define PR_BYTES_PER_INT 4 | |
| 556 #define PR_BYTES_PER_INT64 8 | |
| 557 #define PR_BYTES_PER_LONG 4 | |
| 558 #define PR_BYTES_PER_FLOAT 4 | |
| 559 #define PR_BYTES_PER_DOUBLE 8 | |
| 560 #define PR_BYTES_PER_WORD 4 | |
| 561 #define PR_BYTES_PER_DWORD 8 | |
| 562 | |
| 563 #define PR_BITS_PER_BYTE 8 | |
| 564 #define PR_BITS_PER_SHORT 16 | |
| 565 #define PR_BITS_PER_INT 32 | |
| 566 #define PR_BITS_PER_INT64 64 | |
| 567 #define PR_BITS_PER_LONG 32 | |
| 568 #define PR_BITS_PER_FLOAT 32 | |
| 569 #define PR_BITS_PER_DOUBLE 64 | |
| 570 #define PR_BITS_PER_WORD 32 | |
| 571 | |
| 572 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 573 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 574 #define PR_BITS_PER_INT_LOG2 5 | |
| 575 #define PR_BITS_PER_INT64_LOG2 6 | |
| 576 #define PR_BITS_PER_LONG_LOG2 5 | |
| 577 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 578 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 579 #define PR_BITS_PER_WORD_LOG2 5 | |
| 580 | |
| 581 #define PR_ALIGN_OF_SHORT 2 | |
| 582 #define PR_ALIGN_OF_INT 4 | |
| 583 #define PR_ALIGN_OF_LONG 4 | |
| 584 #define PR_ALIGN_OF_INT64 4 | |
| 585 #define PR_ALIGN_OF_FLOAT 4 | |
| 586 #define PR_ALIGN_OF_DOUBLE 4 | |
| 587 #define PR_ALIGN_OF_POINTER 4 | |
| 588 #define PR_ALIGN_OF_WORD 4 | |
| 589 | |
| 590 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 591 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 592 | |
| 593 #elif defined(__hppa__) | |
| 594 | |
| 595 #undef IS_LITTLE_ENDIAN | |
| 596 #define IS_BIG_ENDIAN 1 | |
| 597 | |
| 598 #define PR_BYTES_PER_BYTE 1 | |
| 599 #define PR_BYTES_PER_SHORT 2 | |
| 600 #define PR_BYTES_PER_INT 4 | |
| 601 #define PR_BYTES_PER_INT64 8 | |
| 602 #define PR_BYTES_PER_LONG 4 | |
| 603 #define PR_BYTES_PER_FLOAT 4 | |
| 604 #define PR_BYTES_PER_DOUBLE 8 | |
| 605 #define PR_BYTES_PER_WORD 4 | |
| 606 #define PR_BYTES_PER_DWORD 8 | |
| 607 | |
| 608 #define PR_BITS_PER_BYTE 8 | |
| 609 #define PR_BITS_PER_SHORT 16 | |
| 610 #define PR_BITS_PER_INT 32 | |
| 611 #define PR_BITS_PER_INT64 64 | |
| 612 #define PR_BITS_PER_LONG 32 | |
| 613 #define PR_BITS_PER_FLOAT 32 | |
| 614 #define PR_BITS_PER_DOUBLE 64 | |
| 615 #define PR_BITS_PER_WORD 32 | |
| 616 | |
| 617 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 618 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 619 #define PR_BITS_PER_INT_LOG2 5 | |
| 620 #define PR_BITS_PER_INT64_LOG2 6 | |
| 621 #define PR_BITS_PER_LONG_LOG2 5 | |
| 622 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 623 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 624 #define PR_BITS_PER_WORD_LOG2 5 | |
| 625 | |
| 626 #define PR_ALIGN_OF_SHORT 2 | |
| 627 #define PR_ALIGN_OF_INT 4 | |
| 628 #define PR_ALIGN_OF_LONG 4 | |
| 629 #define PR_ALIGN_OF_INT64 8 | |
| 630 #define PR_ALIGN_OF_FLOAT 4 | |
| 631 #define PR_ALIGN_OF_DOUBLE 8 | |
| 632 #define PR_ALIGN_OF_POINTER 4 | |
| 633 #define PR_ALIGN_OF_WORD 4 | |
| 634 | |
| 635 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 636 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 637 | |
| 638 #elif defined(__s390x__) | |
| 639 | |
| 640 #define IS_BIG_ENDIAN 1 | |
| 641 #undef IS_LITTLE_ENDIAN | |
| 642 #define IS_64 | |
| 643 | |
| 644 #define PR_BYTES_PER_BYTE 1 | |
| 645 #define PR_BYTES_PER_SHORT 2 | |
| 646 #define PR_BYTES_PER_INT 4 | |
| 647 #define PR_BYTES_PER_INT64 8 | |
| 648 #define PR_BYTES_PER_LONG 8 | |
| 649 #define PR_BYTES_PER_FLOAT 4 | |
| 650 #define PR_BYTES_PER_DOUBLE 8 | |
| 651 #define PR_BYTES_PER_WORD 8 | |
| 652 #define PR_BYTES_PER_DWORD 8 | |
| 653 | |
| 654 #define PR_BITS_PER_BYTE 8 | |
| 655 #define PR_BITS_PER_SHORT 16 | |
| 656 #define PR_BITS_PER_INT 32 | |
| 657 #define PR_BITS_PER_INT64 64 | |
| 658 #define PR_BITS_PER_LONG 64 | |
| 659 #define PR_BITS_PER_FLOAT 32 | |
| 660 #define PR_BITS_PER_DOUBLE 64 | |
| 661 #define PR_BITS_PER_WORD 64 | |
| 662 | |
| 663 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 664 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 665 #define PR_BITS_PER_INT_LOG2 5 | |
| 666 #define PR_BITS_PER_INT64_LOG2 6 | |
| 667 #define PR_BITS_PER_LONG_LOG2 6 | |
| 668 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 669 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 670 #define PR_BITS_PER_WORD_LOG2 6 | |
| 671 | |
| 672 #define PR_ALIGN_OF_SHORT 2 | |
| 673 #define PR_ALIGN_OF_INT 4 | |
| 674 #define PR_ALIGN_OF_LONG 8 | |
| 675 #define PR_ALIGN_OF_INT64 8 | |
| 676 #define PR_ALIGN_OF_FLOAT 4 | |
| 677 #define PR_ALIGN_OF_DOUBLE 8 | |
| 678 #define PR_ALIGN_OF_POINTER 8 | |
| 679 #define PR_ALIGN_OF_WORD 8 | |
| 680 | |
| 681 #define PR_BYTES_PER_WORD_LOG2 3 | |
| 682 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 683 | |
| 684 #elif defined(__s390__) | |
| 685 | |
| 686 #define IS_BIG_ENDIAN 1 | |
| 687 #undef IS_LITTLE_ENDIAN | |
| 688 | |
| 689 #define PR_BYTES_PER_BYTE 1 | |
| 690 #define PR_BYTES_PER_SHORT 2 | |
| 691 #define PR_BYTES_PER_INT 4 | |
| 692 #define PR_BYTES_PER_INT64 8 | |
| 693 #define PR_BYTES_PER_LONG 4 | |
| 694 #define PR_BYTES_PER_FLOAT 4 | |
| 695 #define PR_BYTES_PER_DOUBLE 8 | |
| 696 #define PR_BYTES_PER_WORD 4 | |
| 697 #define PR_BYTES_PER_DWORD 8 | |
| 698 | |
| 699 #define PR_BITS_PER_BYTE 8 | |
| 700 #define PR_BITS_PER_SHORT 16 | |
| 701 #define PR_BITS_PER_INT 32 | |
| 702 #define PR_BITS_PER_INT64 64 | |
| 703 #define PR_BITS_PER_LONG 32 | |
| 704 #define PR_BITS_PER_FLOAT 32 | |
| 705 #define PR_BITS_PER_DOUBLE 64 | |
| 706 #define PR_BITS_PER_WORD 32 | |
| 707 | |
| 708 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 709 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 710 #define PR_BITS_PER_INT_LOG2 5 | |
| 711 #define PR_BITS_PER_INT64_LOG2 6 | |
| 712 #define PR_BITS_PER_LONG_LOG2 5 | |
| 713 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 714 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 715 #define PR_BITS_PER_WORD_LOG2 5 | |
| 716 | |
| 717 #define PR_ALIGN_OF_SHORT 2 | |
| 718 #define PR_ALIGN_OF_INT 4 | |
| 719 #define PR_ALIGN_OF_LONG 4 | |
| 720 #define PR_ALIGN_OF_INT64 4 | |
| 721 #define PR_ALIGN_OF_FLOAT 4 | |
| 722 #define PR_ALIGN_OF_DOUBLE 4 | |
| 723 #define PR_ALIGN_OF_POINTER 4 | |
| 724 #define PR_ALIGN_OF_WORD 4 | |
| 725 | |
| 726 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 727 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 728 | |
| 729 #elif defined(__sh__) | |
| 730 | |
| 731 #define IS_LITTLE_ENDIAN 1 | |
| 732 #undef IS_BIG_ENDIAN | |
| 733 | |
| 734 #define PR_BYTES_PER_BYTE 1 | |
| 735 #define PR_BYTES_PER_SHORT 2 | |
| 736 #define PR_BYTES_PER_INT 4 | |
| 737 #define PR_BYTES_PER_INT64 8 | |
| 738 #define PR_BYTES_PER_LONG 4 | |
| 739 #define PR_BYTES_PER_FLOAT 4 | |
| 740 #define PR_BYTES_PER_DOUBLE 8 | |
| 741 #define PR_BYTES_PER_WORD 4 | |
| 742 #define PR_BYTES_PER_DWORD 8 | |
| 743 | |
| 744 #define PR_BITS_PER_BYTE 8 | |
| 745 #define PR_BITS_PER_SHORT 16 | |
| 746 #define PR_BITS_PER_INT 32 | |
| 747 #define PR_BITS_PER_INT64 64 | |
| 748 #define PR_BITS_PER_LONG 32 | |
| 749 #define PR_BITS_PER_FLOAT 32 | |
| 750 #define PR_BITS_PER_DOUBLE 64 | |
| 751 #define PR_BITS_PER_WORD 32 | |
| 752 | |
| 753 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 754 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 755 #define PR_BITS_PER_INT_LOG2 5 | |
| 756 #define PR_BITS_PER_INT64_LOG2 6 | |
| 757 #define PR_BITS_PER_LONG_LOG2 5 | |
| 758 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 759 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 760 #define PR_BITS_PER_WORD_LOG2 5 | |
| 761 | |
| 762 #define PR_ALIGN_OF_SHORT 2 | |
| 763 #define PR_ALIGN_OF_INT 4 | |
| 764 #define PR_ALIGN_OF_LONG 4 | |
| 765 #define PR_ALIGN_OF_INT64 4 | |
| 766 #define PR_ALIGN_OF_FLOAT 4 | |
| 767 #define PR_ALIGN_OF_DOUBLE 4 | |
| 768 #define PR_ALIGN_OF_POINTER 4 | |
| 769 #define PR_ALIGN_OF_WORD 4 | |
| 770 | |
| 771 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 772 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 773 | |
| 774 #elif defined(__avr32__) | |
| 775 | |
| 776 #undef IS_LITTLE_ENDIAN | |
| 777 #define IS_BIG_ENDIAN 1 | |
| 778 | |
| 779 #define PR_BYTES_PER_BYTE 1 | |
| 780 #define PR_BYTES_PER_SHORT 2 | |
| 781 #define PR_BYTES_PER_INT 4 | |
| 782 #define PR_BYTES_PER_INT64 8 | |
| 783 #define PR_BYTES_PER_LONG 4 | |
| 784 #define PR_BYTES_PER_FLOAT 4 | |
| 785 #define PR_BYTES_PER_DOUBLE 8 | |
| 786 #define PR_BYTES_PER_WORD 4 | |
| 787 #define PR_BYTES_PER_DWORD 8 | |
| 788 | |
| 789 #define PR_BITS_PER_BYTE 8 | |
| 790 #define PR_BITS_PER_SHORT 16 | |
| 791 #define PR_BITS_PER_INT 32 | |
| 792 #define PR_BITS_PER_INT64 64 | |
| 793 #define PR_BITS_PER_LONG 32 | |
| 794 #define PR_BITS_PER_FLOAT 32 | |
| 795 #define PR_BITS_PER_DOUBLE 64 | |
| 796 #define PR_BITS_PER_WORD 32 | |
| 797 | |
| 798 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 799 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 800 #define PR_BITS_PER_INT_LOG2 5 | |
| 801 #define PR_BITS_PER_INT64_LOG2 6 | |
| 802 #define PR_BITS_PER_LONG_LOG2 5 | |
| 803 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 804 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 805 #define PR_BITS_PER_WORD_LOG2 5 | |
| 806 | |
| 807 #define PR_ALIGN_OF_SHORT 2 | |
| 808 #define PR_ALIGN_OF_INT 4 | |
| 809 #define PR_ALIGN_OF_LONG 4 | |
| 810 #define PR_ALIGN_OF_INT64 4 | |
| 811 #define PR_ALIGN_OF_FLOAT 4 | |
| 812 #define PR_ALIGN_OF_DOUBLE 4 | |
| 813 #define PR_ALIGN_OF_POINTER 4 | |
| 814 #define PR_ALIGN_OF_WORD 4 | |
| 815 | |
| 816 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 817 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 818 | |
| 819 #elif defined(__m32r__) | |
| 820 | |
| 821 #undef IS_LITTLE_ENDIAN | |
| 822 #define IS_BIG_ENDIAN 1 | |
| 823 | |
| 824 #define PR_BYTES_PER_BYTE 1 | |
| 825 #define PR_BYTES_PER_SHORT 2 | |
| 826 #define PR_BYTES_PER_INT 4 | |
| 827 #define PR_BYTES_PER_INT64 8 | |
| 828 #define PR_BYTES_PER_LONG 4 | |
| 829 #define PR_BYTES_PER_FLOAT 4 | |
| 830 #define PR_BYTES_PER_DOUBLE 8 | |
| 831 #define PR_BYTES_PER_WORD 4 | |
| 832 #define PR_BYTES_PER_DWORD 8 | |
| 833 | |
| 834 #define PR_BITS_PER_BYTE 8 | |
| 835 #define PR_BITS_PER_SHORT 16 | |
| 836 #define PR_BITS_PER_INT 32 | |
| 837 #define PR_BITS_PER_INT64 64 | |
| 838 #define PR_BITS_PER_LONG 32 | |
| 839 #define PR_BITS_PER_FLOAT 32 | |
| 840 #define PR_BITS_PER_DOUBLE 64 | |
| 841 #define PR_BITS_PER_WORD 32 | |
| 842 | |
| 843 #define PR_BITS_PER_BYTE_LOG2 3 | |
| 844 #define PR_BITS_PER_SHORT_LOG2 4 | |
| 845 #define PR_BITS_PER_INT_LOG2 5 | |
| 846 #define PR_BITS_PER_INT64_LOG2 6 | |
| 847 #define PR_BITS_PER_LONG_LOG2 5 | |
| 848 #define PR_BITS_PER_FLOAT_LOG2 5 | |
| 849 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
| 850 #define PR_BITS_PER_WORD_LOG2 5 | |
| 851 | |
| 852 #define PR_ALIGN_OF_SHORT 2 | |
| 853 #define PR_ALIGN_OF_INT 4 | |
| 854 #define PR_ALIGN_OF_LONG 4 | |
| 855 #define PR_ALIGN_OF_INT64 4 | |
| 856 #define PR_ALIGN_OF_FLOAT 4 | |
| 857 #define PR_ALIGN_OF_DOUBLE 4 | |
| 858 #define PR_ALIGN_OF_POINTER 4 | |
| 859 #define PR_ALIGN_OF_WORD 4 | |
| 860 | |
| 861 #define PR_BYTES_PER_WORD_LOG2 2 | |
| 862 #define PR_BYTES_PER_DWORD_LOG2 3 | |
| 863 | |
| 864 #else | |
| 865 | |
| 866 #error "Unknown CPU architecture" | |
| 867 | |
| 868 #endif | |
| 869 | |
| 870 #ifndef HAVE_LONG_LONG | |
| 871 #define HAVE_LONG_LONG | |
| 872 #endif | |
| 873 #if PR_ALIGN_OF_DOUBLE == 8 | |
| 874 #define HAVE_ALIGNED_DOUBLES | |
| 875 #endif | |
| 876 #if PR_ALIGN_OF_INT64 == 8 | |
| 877 #define HAVE_ALIGNED_LONGLONGS | |
| 878 #endif | |
| 879 | |
| 880 #ifndef NO_NSPR_10_SUPPORT | |
| 881 | |
| 882 #define BYTES_PER_BYTE PR_BYTES_PER_BYTE | |
| 883 #define BYTES_PER_SHORT PR_BYTES_PER_SHORT | |
| 884 #define BYTES_PER_INT PR_BYTES_PER_INT | |
| 885 #define BYTES_PER_INT64 PR_BYTES_PER_INT64 | |
| 886 #define BYTES_PER_LONG PR_BYTES_PER_LONG | |
| 887 #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT | |
| 888 #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE | |
| 889 #define BYTES_PER_WORD PR_BYTES_PER_WORD | |
| 890 #define BYTES_PER_DWORD PR_BYTES_PER_DWORD | |
| 891 | |
| 892 #define BITS_PER_BYTE PR_BITS_PER_BYTE | |
| 893 #define BITS_PER_SHORT PR_BITS_PER_SHORT | |
| 894 #define BITS_PER_INT PR_BITS_PER_INT | |
| 895 #define BITS_PER_INT64 PR_BITS_PER_INT64 | |
| 896 #define BITS_PER_LONG PR_BITS_PER_LONG | |
| 897 #define BITS_PER_FLOAT PR_BITS_PER_FLOAT | |
| 898 #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE | |
| 899 #define BITS_PER_WORD PR_BITS_PER_WORD | |
| 900 | |
| 901 #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 | |
| 902 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 | |
| 903 #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 | |
| 904 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 | |
| 905 #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 | |
| 906 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 | |
| 907 #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 | |
| 908 #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 | |
| 909 | |
| 910 #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT | |
| 911 #define ALIGN_OF_INT PR_ALIGN_OF_INT | |
| 912 #define ALIGN_OF_LONG PR_ALIGN_OF_LONG | |
| 913 #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 | |
| 914 #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT | |
| 915 #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE | |
| 916 #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER | |
| 917 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD | |
| 918 | |
| 919 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 | |
| 920 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 | |
| 921 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 | |
| 922 | |
| 923 #endif /* NO_NSPR_10_SUPPORT */ | |
| 924 | |
| 925 #endif /* nspr_cpucfg___ */ | |
| OLD | NEW |