VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/prcpucfg.h@ 535

Last change on this file since 535 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 18.1 KB
Line 
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is the Netscape Portable Runtime (NSPR).
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998-2000
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 *
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38#ifndef nspr_cpucfg___
39#define nspr_cpucfg___
40
41#ifndef __L4_XPCOM__
42 /* i.e. we are building for Linux, or Linux executables for L4 */
43
44#ifndef XP_UNIX
45#define XP_UNIX
46#endif
47
48#ifndef LINUX
49#define LINUX
50#endif
51
52#ifdef L4ENV
53#undef L4ENV
54#endif
55
56#else /* __L4ENV__ defined */
57
58#ifndef XP_UNIX
59#define XP_UNIX
60#endif
61
62#ifndef L4ENV
63#define L4ENV
64#endif
65
66#endif /* __L4ENV__ defined */
67
68#define PR_AF_INET6 10 /* same as AF_INET6 */
69
70#ifdef __powerpc__
71
72#undef IS_LITTLE_ENDIAN
73#define IS_BIG_ENDIAN 1
74
75#define PR_BYTES_PER_BYTE 1
76#define PR_BYTES_PER_SHORT 2
77#define PR_BYTES_PER_INT 4
78#define PR_BYTES_PER_INT64 8
79#define PR_BYTES_PER_LONG 4
80#define PR_BYTES_PER_FLOAT 4
81#define PR_BYTES_PER_DOUBLE 8
82#define PR_BYTES_PER_WORD 4
83#define PR_BYTES_PER_DWORD 8
84
85#define PR_BITS_PER_BYTE 8
86#define PR_BITS_PER_SHORT 16
87#define PR_BITS_PER_INT 32
88#define PR_BITS_PER_INT64 64
89#define PR_BITS_PER_LONG 32
90#define PR_BITS_PER_FLOAT 32
91#define PR_BITS_PER_DOUBLE 64
92#define PR_BITS_PER_WORD 32
93
94#define PR_BITS_PER_BYTE_LOG2 3
95#define PR_BITS_PER_SHORT_LOG2 4
96#define PR_BITS_PER_INT_LOG2 5
97#define PR_BITS_PER_INT64_LOG2 6
98#define PR_BITS_PER_LONG_LOG2 5
99#define PR_BITS_PER_FLOAT_LOG2 5
100#define PR_BITS_PER_DOUBLE_LOG2 6
101#define PR_BITS_PER_WORD_LOG2 5
102
103#define PR_ALIGN_OF_SHORT 2
104#define PR_ALIGN_OF_INT 4
105#define PR_ALIGN_OF_LONG 4
106#define PR_ALIGN_OF_INT64 8
107#define PR_ALIGN_OF_FLOAT 4
108#define PR_ALIGN_OF_DOUBLE 8
109#define PR_ALIGN_OF_POINTER 4
110#define PR_ALIGN_OF_WORD 4
111
112#define PR_BYTES_PER_WORD_LOG2 2
113#define PR_BYTES_PER_DWORD_LOG2 3
114
115#elif defined(__alpha)
116
117#define IS_LITTLE_ENDIAN 1
118#undef IS_BIG_ENDIAN
119#define IS_64
120
121#define PR_BYTES_PER_BYTE 1
122#define PR_BYTES_PER_SHORT 2
123#define PR_BYTES_PER_INT 4
124#define PR_BYTES_PER_INT64 8
125#define PR_BYTES_PER_LONG 8
126#define PR_BYTES_PER_FLOAT 4
127#define PR_BYTES_PER_DOUBLE 8
128#define PR_BYTES_PER_WORD 8
129#define PR_BYTES_PER_DWORD 8
130
131#define PR_BITS_PER_BYTE 8
132#define PR_BITS_PER_SHORT 16
133#define PR_BITS_PER_INT 32
134#define PR_BITS_PER_INT64 64
135#define PR_BITS_PER_LONG 64
136#define PR_BITS_PER_FLOAT 32
137#define PR_BITS_PER_DOUBLE 64
138#define PR_BITS_PER_WORD 64
139
140#define PR_BITS_PER_BYTE_LOG2 3
141#define PR_BITS_PER_SHORT_LOG2 4
142#define PR_BITS_PER_INT_LOG2 5
143#define PR_BITS_PER_INT64_LOG2 6
144#define PR_BITS_PER_LONG_LOG2 6
145#define PR_BITS_PER_FLOAT_LOG2 5
146#define PR_BITS_PER_DOUBLE_LOG2 6
147#define PR_BITS_PER_WORD_LOG2 6
148
149#define PR_ALIGN_OF_SHORT 2
150#define PR_ALIGN_OF_INT 4
151#define PR_ALIGN_OF_LONG 8
152#define PR_ALIGN_OF_INT64 8
153#define PR_ALIGN_OF_FLOAT 4
154#define PR_ALIGN_OF_DOUBLE 8
155#define PR_ALIGN_OF_POINTER 8
156#define PR_ALIGN_OF_WORD 8
157
158#define PR_BYTES_PER_WORD_LOG2 3
159#define PR_BYTES_PER_DWORD_LOG2 3
160
161#elif defined(__ia64__)
162
163#define IS_LITTLE_ENDIAN 1
164#undef IS_BIG_ENDIAN
165#define IS_64
166
167#define PR_BYTES_PER_BYTE 1
168#define PR_BYTES_PER_SHORT 2
169#define PR_BYTES_PER_INT 4
170#define PR_BYTES_PER_INT64 8
171#define PR_BYTES_PER_LONG 8
172#define PR_BYTES_PER_FLOAT 4
173#define PR_BYTES_PER_DOUBLE 8
174#define PR_BYTES_PER_WORD 8
175#define PR_BYTES_PER_DWORD 8
176
177#define PR_BITS_PER_BYTE 8
178#define PR_BITS_PER_SHORT 16
179#define PR_BITS_PER_INT 32
180#define PR_BITS_PER_INT64 64
181#define PR_BITS_PER_LONG 64
182#define PR_BITS_PER_FLOAT 32
183#define PR_BITS_PER_DOUBLE 64
184#define PR_BITS_PER_WORD 64
185
186#define PR_BITS_PER_BYTE_LOG2 3
187#define PR_BITS_PER_SHORT_LOG2 4
188#define PR_BITS_PER_INT_LOG2 5
189#define PR_BITS_PER_INT64_LOG2 6
190#define PR_BITS_PER_LONG_LOG2 6
191#define PR_BITS_PER_FLOAT_LOG2 5
192#define PR_BITS_PER_DOUBLE_LOG2 6
193#define PR_BITS_PER_WORD_LOG2 6
194
195#define PR_ALIGN_OF_SHORT 2
196#define PR_ALIGN_OF_INT 4
197#define PR_ALIGN_OF_LONG 8
198#define PR_ALIGN_OF_INT64 8
199#define PR_ALIGN_OF_FLOAT 4
200#define PR_ALIGN_OF_DOUBLE 8
201#define PR_ALIGN_OF_POINTER 8
202#define PR_ALIGN_OF_WORD 8
203
204#define PR_BYTES_PER_WORD_LOG2 3
205#define PR_BYTES_PER_DWORD_LOG2 3
206
207#elif defined(__x86_64__)
208
209#define IS_LITTLE_ENDIAN 1
210#undef IS_BIG_ENDIAN
211#define IS_64
212
213#define PR_BYTES_PER_BYTE 1
214#define PR_BYTES_PER_SHORT 2
215#define PR_BYTES_PER_INT 4
216#define PR_BYTES_PER_INT64 8
217#define PR_BYTES_PER_LONG 8
218#define PR_BYTES_PER_FLOAT 4
219#define PR_BYTES_PER_DOUBLE 8
220#define PR_BYTES_PER_WORD 8
221#define PR_BYTES_PER_DWORD 8
222
223#define PR_BITS_PER_BYTE 8
224#define PR_BITS_PER_SHORT 16
225#define PR_BITS_PER_INT 32
226#define PR_BITS_PER_INT64 64
227#define PR_BITS_PER_LONG 64
228#define PR_BITS_PER_FLOAT 32
229#define PR_BITS_PER_DOUBLE 64
230#define PR_BITS_PER_WORD 64
231
232#define PR_BITS_PER_BYTE_LOG2 3
233#define PR_BITS_PER_SHORT_LOG2 4
234#define PR_BITS_PER_INT_LOG2 5
235#define PR_BITS_PER_INT64_LOG2 6
236#define PR_BITS_PER_LONG_LOG2 6
237#define PR_BITS_PER_FLOAT_LOG2 5
238#define PR_BITS_PER_DOUBLE_LOG2 6
239#define PR_BITS_PER_WORD_LOG2 6
240
241#define PR_ALIGN_OF_SHORT 2
242#define PR_ALIGN_OF_INT 4
243#define PR_ALIGN_OF_LONG 8
244#define PR_ALIGN_OF_INT64 8
245#define PR_ALIGN_OF_FLOAT 4
246#define PR_ALIGN_OF_DOUBLE 8
247#define PR_ALIGN_OF_POINTER 8
248#define PR_ALIGN_OF_WORD 8
249
250#define PR_BYTES_PER_WORD_LOG2 3
251#define PR_BYTES_PER_DWORD_LOG2 3
252
253#elif defined(__mc68000__)
254
255#undef IS_LITTLE_ENDIAN
256#define IS_BIG_ENDIAN 1
257
258#define PR_BYTES_PER_BYTE 1
259#define PR_BYTES_PER_SHORT 2
260#define PR_BYTES_PER_INT 4
261#define PR_BYTES_PER_INT64 8
262#define PR_BYTES_PER_LONG 4
263#define PR_BYTES_PER_FLOAT 4
264#define PR_BYTES_PER_DOUBLE 8
265#define PR_BYTES_PER_WORD 4
266#define PR_BYTES_PER_DWORD 8
267
268#define PR_BITS_PER_BYTE 8
269#define PR_BITS_PER_SHORT 16
270#define PR_BITS_PER_INT 32
271#define PR_BITS_PER_INT64 64
272#define PR_BITS_PER_LONG 32
273#define PR_BITS_PER_FLOAT 32
274#define PR_BITS_PER_DOUBLE 64
275#define PR_BITS_PER_WORD 32
276
277#define PR_BITS_PER_BYTE_LOG2 3
278#define PR_BITS_PER_SHORT_LOG2 4
279#define PR_BITS_PER_INT_LOG2 5
280#define PR_BITS_PER_INT64_LOG2 6
281#define PR_BITS_PER_LONG_LOG2 5
282#define PR_BITS_PER_FLOAT_LOG2 5
283#define PR_BITS_PER_DOUBLE_LOG2 6
284#define PR_BITS_PER_WORD_LOG2 5
285
286#define PR_ALIGN_OF_SHORT 2
287#define PR_ALIGN_OF_INT 2
288#define PR_ALIGN_OF_LONG 2
289#define PR_ALIGN_OF_INT64 2
290#define PR_ALIGN_OF_FLOAT 2
291#define PR_ALIGN_OF_DOUBLE 2
292#define PR_ALIGN_OF_POINTER 2
293#define PR_ALIGN_OF_WORD 2
294
295#define PR_BYTES_PER_WORD_LOG2 2
296#define PR_BYTES_PER_DWORD_LOG2 3
297
298#elif defined(__sparc__)
299
300#undef IS_LITTLE_ENDIAN
301#define IS_BIG_ENDIAN 1
302
303#define PR_BYTES_PER_BYTE 1
304#define PR_BYTES_PER_SHORT 2
305#define PR_BYTES_PER_INT 4
306#define PR_BYTES_PER_INT64 8
307#define PR_BYTES_PER_LONG 4
308#define PR_BYTES_PER_FLOAT 4
309#define PR_BYTES_PER_DOUBLE 8
310#define PR_BYTES_PER_WORD 4
311#define PR_BYTES_PER_DWORD 8
312
313#define PR_BITS_PER_BYTE 8
314#define PR_BITS_PER_SHORT 16
315#define PR_BITS_PER_INT 32
316#define PR_BITS_PER_INT64 64
317#define PR_BITS_PER_LONG 32
318#define PR_BITS_PER_FLOAT 32
319#define PR_BITS_PER_DOUBLE 64
320#define PR_BITS_PER_WORD 32
321
322#define PR_BITS_PER_BYTE_LOG2 3
323#define PR_BITS_PER_SHORT_LOG2 4
324#define PR_BITS_PER_INT_LOG2 5
325#define PR_BITS_PER_INT64_LOG2 6
326#define PR_BITS_PER_LONG_LOG2 5
327#define PR_BITS_PER_FLOAT_LOG2 5
328#define PR_BITS_PER_DOUBLE_LOG2 6
329#define PR_BITS_PER_WORD_LOG2 5
330
331#define PR_ALIGN_OF_SHORT 2
332#define PR_ALIGN_OF_INT 4
333#define PR_ALIGN_OF_LONG 4
334#define PR_ALIGN_OF_INT64 8
335#define PR_ALIGN_OF_FLOAT 4
336#define PR_ALIGN_OF_DOUBLE 8
337#define PR_ALIGN_OF_POINTER 4
338#define PR_ALIGN_OF_WORD 4
339
340#define PR_BYTES_PER_WORD_LOG2 2
341#define PR_BYTES_PER_DWORD_LOG2 3
342
343#elif defined(__i386__)
344
345#define IS_LITTLE_ENDIAN 1
346#undef IS_BIG_ENDIAN
347
348#define PR_BYTES_PER_BYTE 1
349#define PR_BYTES_PER_SHORT 2
350#define PR_BYTES_PER_INT 4
351#define PR_BYTES_PER_INT64 8
352#define PR_BYTES_PER_LONG 4
353#define PR_BYTES_PER_FLOAT 4
354#define PR_BYTES_PER_DOUBLE 8
355#define PR_BYTES_PER_WORD 4
356#define PR_BYTES_PER_DWORD 8
357
358#define PR_BITS_PER_BYTE 8
359#define PR_BITS_PER_SHORT 16
360#define PR_BITS_PER_INT 32
361#define PR_BITS_PER_INT64 64
362#define PR_BITS_PER_LONG 32
363#define PR_BITS_PER_FLOAT 32
364#define PR_BITS_PER_DOUBLE 64
365#define PR_BITS_PER_WORD 32
366
367#define PR_BITS_PER_BYTE_LOG2 3
368#define PR_BITS_PER_SHORT_LOG2 4
369#define PR_BITS_PER_INT_LOG2 5
370#define PR_BITS_PER_INT64_LOG2 6
371#define PR_BITS_PER_LONG_LOG2 5
372#define PR_BITS_PER_FLOAT_LOG2 5
373#define PR_BITS_PER_DOUBLE_LOG2 6
374#define PR_BITS_PER_WORD_LOG2 5
375
376#define PR_ALIGN_OF_SHORT 2
377#define PR_ALIGN_OF_INT 4
378#define PR_ALIGN_OF_LONG 4
379#define PR_ALIGN_OF_INT64 4
380#define PR_ALIGN_OF_FLOAT 4
381#define PR_ALIGN_OF_DOUBLE 4
382#define PR_ALIGN_OF_POINTER 4
383#define PR_ALIGN_OF_WORD 4
384
385#define PR_BYTES_PER_WORD_LOG2 2
386#define PR_BYTES_PER_DWORD_LOG2 3
387
388#elif defined(__mips__)
389
390#ifdef __MIPSEB__
391#define IS_BIG_ENDIAN 1
392#undef IS_LITTLE_ENDIAN
393#elif defined(__MIPSEL__)
394#define IS_LITTLE_ENDIAN 1
395#undef IS_BIG_ENDIAN
396#else
397#error "Unknown MIPS endianness."
398#endif
399
400#define PR_BYTES_PER_BYTE 1
401#define PR_BYTES_PER_SHORT 2
402#define PR_BYTES_PER_INT 4
403#define PR_BYTES_PER_INT64 8
404#define PR_BYTES_PER_LONG 4
405#define PR_BYTES_PER_FLOAT 4
406#define PR_BYTES_PER_DOUBLE 8
407#define PR_BYTES_PER_WORD 4
408#define PR_BYTES_PER_DWORD 8
409
410#define PR_BITS_PER_BYTE 8
411#define PR_BITS_PER_SHORT 16
412#define PR_BITS_PER_INT 32
413#define PR_BITS_PER_INT64 64
414#define PR_BITS_PER_LONG 32
415#define PR_BITS_PER_FLOAT 32
416#define PR_BITS_PER_DOUBLE 64
417#define PR_BITS_PER_WORD 32
418
419#define PR_BITS_PER_BYTE_LOG2 3
420#define PR_BITS_PER_SHORT_LOG2 4
421#define PR_BITS_PER_INT_LOG2 5
422#define PR_BITS_PER_INT64_LOG2 6
423#define PR_BITS_PER_LONG_LOG2 5
424#define PR_BITS_PER_FLOAT_LOG2 5
425#define PR_BITS_PER_DOUBLE_LOG2 6
426#define PR_BITS_PER_WORD_LOG2 5
427
428#define PR_ALIGN_OF_SHORT 2
429#define PR_ALIGN_OF_INT 4
430#define PR_ALIGN_OF_LONG 4
431#define PR_ALIGN_OF_INT64 8
432#define PR_ALIGN_OF_FLOAT 4
433#define PR_ALIGN_OF_DOUBLE 8
434#define PR_ALIGN_OF_POINTER 4
435#define PR_ALIGN_OF_WORD 4
436
437#define PR_BYTES_PER_WORD_LOG2 2
438#define PR_BYTES_PER_DWORD_LOG2 3
439
440#elif defined(__arm__)
441
442#define IS_LITTLE_ENDIAN 1
443#undef IS_BIG_ENDIAN
444
445#define PR_BYTES_PER_BYTE 1
446#define PR_BYTES_PER_SHORT 2
447#define PR_BYTES_PER_INT 4
448#define PR_BYTES_PER_INT64 8
449#define PR_BYTES_PER_LONG 4
450#define PR_BYTES_PER_FLOAT 4
451#define PR_BYTES_PER_DOUBLE 8
452#define PR_BYTES_PER_WORD 4
453#define PR_BYTES_PER_DWORD 8
454
455#define PR_BITS_PER_BYTE 8
456#define PR_BITS_PER_SHORT 16
457#define PR_BITS_PER_INT 32
458#define PR_BITS_PER_INT64 64
459#define PR_BITS_PER_LONG 32
460#define PR_BITS_PER_FLOAT 32
461#define PR_BITS_PER_DOUBLE 64
462#define PR_BITS_PER_WORD 32
463
464#define PR_BITS_PER_BYTE_LOG2 3
465#define PR_BITS_PER_SHORT_LOG2 4
466#define PR_BITS_PER_INT_LOG2 5
467#define PR_BITS_PER_INT64_LOG2 6
468#define PR_BITS_PER_LONG_LOG2 5
469#define PR_BITS_PER_FLOAT_LOG2 5
470#define PR_BITS_PER_DOUBLE_LOG2 6
471#define PR_BITS_PER_WORD_LOG2 5
472
473#define PR_ALIGN_OF_SHORT 2
474#define PR_ALIGN_OF_INT 4
475#define PR_ALIGN_OF_LONG 4
476#define PR_ALIGN_OF_INT64 4
477#define PR_ALIGN_OF_FLOAT 4
478#define PR_ALIGN_OF_DOUBLE 4
479#define PR_ALIGN_OF_POINTER 4
480#define PR_ALIGN_OF_WORD 4
481
482#define PR_BYTES_PER_WORD_LOG2 2
483#define PR_BYTES_PER_DWORD_LOG2 3
484
485#elif defined(__hppa__)
486
487#undef IS_LITTLE_ENDIAN
488#define IS_BIG_ENDIAN 1
489
490#define PR_BYTES_PER_BYTE 1
491#define PR_BYTES_PER_SHORT 2
492#define PR_BYTES_PER_INT 4
493#define PR_BYTES_PER_INT64 8
494#define PR_BYTES_PER_LONG 4
495#define PR_BYTES_PER_FLOAT 4
496#define PR_BYTES_PER_DOUBLE 8
497#define PR_BYTES_PER_WORD 4
498#define PR_BYTES_PER_DWORD 8
499
500#define PR_BITS_PER_BYTE 8
501#define PR_BITS_PER_SHORT 16
502#define PR_BITS_PER_INT 32
503#define PR_BITS_PER_INT64 64
504#define PR_BITS_PER_LONG 32
505#define PR_BITS_PER_FLOAT 32
506#define PR_BITS_PER_DOUBLE 64
507#define PR_BITS_PER_WORD 32
508
509#define PR_BITS_PER_BYTE_LOG2 3
510#define PR_BITS_PER_SHORT_LOG2 4
511#define PR_BITS_PER_INT_LOG2 5
512#define PR_BITS_PER_INT64_LOG2 6
513#define PR_BITS_PER_LONG_LOG2 5
514#define PR_BITS_PER_FLOAT_LOG2 5
515#define PR_BITS_PER_DOUBLE_LOG2 6
516#define PR_BITS_PER_WORD_LOG2 5
517
518#define PR_ALIGN_OF_SHORT 2
519#define PR_ALIGN_OF_INT 4
520#define PR_ALIGN_OF_LONG 4
521#define PR_ALIGN_OF_INT64 8
522#define PR_ALIGN_OF_FLOAT 4
523#define PR_ALIGN_OF_DOUBLE 8
524#define PR_ALIGN_OF_POINTER 4
525#define PR_ALIGN_OF_WORD 4
526
527#define PR_BYTES_PER_WORD_LOG2 2
528#define PR_BYTES_PER_DWORD_LOG2 3
529
530#elif defined(__s390x__)
531
532#define IS_BIG_ENDIAN 1
533#undef IS_LITTLE_ENDIAN
534#define IS_64
535
536#define PR_BYTES_PER_BYTE 1
537#define PR_BYTES_PER_SHORT 2
538#define PR_BYTES_PER_INT 4
539#define PR_BYTES_PER_INT64 8
540#define PR_BYTES_PER_LONG 8
541#define PR_BYTES_PER_FLOAT 4
542#define PR_BYTES_PER_DOUBLE 8
543#define PR_BYTES_PER_WORD 8
544#define PR_BYTES_PER_DWORD 8
545
546#define PR_BITS_PER_BYTE 8
547#define PR_BITS_PER_SHORT 16
548#define PR_BITS_PER_INT 32
549#define PR_BITS_PER_INT64 64
550#define PR_BITS_PER_LONG 64
551#define PR_BITS_PER_FLOAT 32
552#define PR_BITS_PER_DOUBLE 64
553#define PR_BITS_PER_WORD 64
554
555#define PR_BITS_PER_BYTE_LOG2 3
556#define PR_BITS_PER_SHORT_LOG2 4
557#define PR_BITS_PER_INT_LOG2 5
558#define PR_BITS_PER_INT64_LOG2 6
559#define PR_BITS_PER_LONG_LOG2 6
560#define PR_BITS_PER_FLOAT_LOG2 5
561#define PR_BITS_PER_DOUBLE_LOG2 6
562#define PR_BITS_PER_WORD_LOG2 6
563
564#define PR_ALIGN_OF_SHORT 2
565#define PR_ALIGN_OF_INT 4
566#define PR_ALIGN_OF_LONG 8
567#define PR_ALIGN_OF_INT64 8
568#define PR_ALIGN_OF_FLOAT 4
569#define PR_ALIGN_OF_DOUBLE 8
570#define PR_ALIGN_OF_POINTER 8
571#define PR_ALIGN_OF_WORD 8
572
573#define PR_BYTES_PER_WORD_LOG2 3
574#define PR_BYTES_PER_DWORD_LOG2 3
575
576#elif defined(__s390__)
577
578#define IS_BIG_ENDIAN 1
579#undef IS_LITTLE_ENDIAN
580
581#define PR_BYTES_PER_BYTE 1
582#define PR_BYTES_PER_SHORT 2
583#define PR_BYTES_PER_INT 4
584#define PR_BYTES_PER_INT64 8
585#define PR_BYTES_PER_LONG 4
586#define PR_BYTES_PER_FLOAT 4
587#define PR_BYTES_PER_DOUBLE 8
588#define PR_BYTES_PER_WORD 4
589#define PR_BYTES_PER_DWORD 8
590
591#define PR_BITS_PER_BYTE 8
592#define PR_BITS_PER_SHORT 16
593#define PR_BITS_PER_INT 32
594#define PR_BITS_PER_INT64 64
595#define PR_BITS_PER_LONG 32
596#define PR_BITS_PER_FLOAT 32
597#define PR_BITS_PER_DOUBLE 64
598#define PR_BITS_PER_WORD 32
599
600#define PR_BITS_PER_BYTE_LOG2 3
601#define PR_BITS_PER_SHORT_LOG2 4
602#define PR_BITS_PER_INT_LOG2 5
603#define PR_BITS_PER_INT64_LOG2 6
604#define PR_BITS_PER_LONG_LOG2 5
605#define PR_BITS_PER_FLOAT_LOG2 5
606#define PR_BITS_PER_DOUBLE_LOG2 6
607#define PR_BITS_PER_WORD_LOG2 5
608
609#define PR_ALIGN_OF_SHORT 2
610#define PR_ALIGN_OF_INT 4
611#define PR_ALIGN_OF_LONG 4
612#define PR_ALIGN_OF_INT64 4
613#define PR_ALIGN_OF_FLOAT 4
614#define PR_ALIGN_OF_DOUBLE 4
615#define PR_ALIGN_OF_POINTER 4
616#define PR_ALIGN_OF_WORD 4
617
618#define PR_BYTES_PER_WORD_LOG2 2
619#define PR_BYTES_PER_DWORD_LOG2 3
620
621#else
622
623#error "Unknown CPU architecture"
624
625#endif
626
627#define HAVE_LONG_LONG
628#if PR_ALIGN_OF_DOUBLE == 8
629#define HAVE_ALIGNED_DOUBLES
630#endif
631#if PR_ALIGN_OF_INT64 == 8
632#define HAVE_ALIGNED_LONGLONGS
633#endif
634
635#ifndef NO_NSPR_10_SUPPORT
636
637#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
638#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
639#define BYTES_PER_INT PR_BYTES_PER_INT
640#define BYTES_PER_INT64 PR_BYTES_PER_INT64
641#define BYTES_PER_LONG PR_BYTES_PER_LONG
642#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
643#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
644#define BYTES_PER_WORD PR_BYTES_PER_WORD
645#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
646
647#define BITS_PER_BYTE PR_BITS_PER_BYTE
648#define BITS_PER_SHORT PR_BITS_PER_SHORT
649#define BITS_PER_INT PR_BITS_PER_INT
650#define BITS_PER_INT64 PR_BITS_PER_INT64
651#define BITS_PER_LONG PR_BITS_PER_LONG
652#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
653#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
654#define BITS_PER_WORD PR_BITS_PER_WORD
655
656#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
657#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
658#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
659#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
660#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
661#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
662#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
663#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
664
665#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
666#define ALIGN_OF_INT PR_ALIGN_OF_INT
667#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
668#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
669#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
670#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
671#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
672#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
673
674#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
675#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
676#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
677
678#endif /* NO_NSPR_10_SUPPORT */
679
680#endif /* nspr_cpucfg___ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette