1 /****************************************************************************/
2 #if( defined _MSC_VER && _MSC_VER >= 1400 && defined _M_IX86 )
5 x86 is CAS, so isolation is cache-line length
8 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
9 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
12 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
14 typedef int long unsigned lfds700_pal_atom_t;
15 typedef int long unsigned lfds700_pal_uint_t;
17 #define LFDS700_PAL_PROCESSOR_STRING "x86"
19 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
20 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
22 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
23 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 32
31 /****************************************************************************/
32 #if( defined _MSC_VER && _MSC_VER >= 1400 && (defined _M_X64 || defined _M_AMD64) )
35 x64 is CAS, so isolation is cache-line length
38 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
39 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
42 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
44 typedef int long long unsigned lfds700_pal_atom_t;
45 typedef int long long unsigned lfds700_pal_uint_t;
47 #define LFDS700_PAL_PROCESSOR_STRING "x64"
49 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
50 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
52 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
53 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
61 /****************************************************************************/
62 #if( defined _MSC_VER && _MSC_VER >= 1400 && defined _M_IA64 )
64 /* TRD : MSVC, Itanium
65 IA64 is CAS, so isolation is cache-line length
68 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
69 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
72 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
74 typedef int long long unsigned lfds700_pal_atom_t;
75 typedef int long long unsigned lfds700_pal_uint_t;
77 #define LFDS700_PAL_PROCESSOR_STRING "IA64"
79 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
80 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
82 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
83 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
91 /****************************************************************************/
92 #if( defined _MSC_VER && _MSC_VER >= 1400 && defined _M_ARM )
94 /* TRD : MSVC, 32-bit ARM
96 ARM is LL/SC and uses a reservation granule of 8 to 2048 bytes
97 so the isolation value used here is worst-case - be sure to set
98 this correctly, otherwise structures are painfully large
101 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
102 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
105 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
107 typedef int long unsigned lfds700_pal_atom_t;
108 typedef int long unsigned lfds700_pal_uint_t;
110 #define LFDS700_PAL_PROCESSOR_STRING "ARM (32-bit)"
112 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
113 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
115 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
116 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 2048
124 /****************************************************************************/
125 #if( defined __GNUC__ && defined __arm__ )
127 /* TRD : GCC, 32-bit ARM
129 ARM is LL/SC and uses a reservation granule of 8 to 2048 bytes
130 so the isolation value used here is worst-case - be sure to set
131 this correctly, otherwise structures are painfully large
134 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
135 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
138 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
140 typedef int long unsigned lfds700_pal_atom_t;
141 typedef int long unsigned lfds700_pal_uint_t;
143 #define LFDS700_PAL_PROCESSOR_STRING "ARM (32-bit)"
145 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
146 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
148 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
149 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 2048
157 /****************************************************************************/
158 #if( defined __GNUC__ && defined __aarch64__ )
160 /* TRD : GCC, 64-bit ARM
162 ARM is LL/SC and uses a reservation granule of 8 to 2048 bytes
163 so the isolation value used here is worst-case - be sure to set
164 this correctly, otherwise structures are painfully large
167 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
168 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
171 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
173 typedef int long long unsigned lfds700_pal_atom_t;
174 typedef int long long unsigned lfds700_pal_uint_t;
176 #define LFDS700_PAL_PROCESSOR_STRING "ARM (64-bit)"
178 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
179 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
181 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
182 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 2048
190 /****************************************************************************/
191 #if( defined __GNUC__ && (defined __i686__ || defined __i586__ || defined __i486__) )
195 x86 is CAS, so isolation is cache-line length
198 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
199 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
202 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
204 typedef int long unsigned lfds700_pal_atom_t;
205 typedef int long unsigned lfds700_pal_uint_t;
207 #define LFDS700_PAL_PROCESSOR_STRING "x86"
209 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
210 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
212 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
213 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 32
221 /****************************************************************************/
222 #if( defined __GNUC__ && defined __x86_64__ )
226 x64 is CAS, so isolation is cache-line length
229 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
230 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
233 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
235 typedef int long long unsigned lfds700_pal_atom_t;
236 typedef int long long unsigned lfds700_pal_uint_t;
238 #define LFDS700_PAL_PROCESSOR_STRING "x64"
240 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
241 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
243 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
244 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
252 /****************************************************************************/
253 #if( defined __GNUC__ && defined __alpha__ )
257 alpha is LL/SC, but there is only one reservation per processor,
258 so the isolation value used here is cache-line length
261 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
262 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
265 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
267 typedef int long unsigned lfds700_pal_atom_t;
268 typedef int long unsigned lfds700_pal_uint_t;
270 #define LFDS700_PAL_PROCESSOR_STRING "alpha"
272 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
273 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
275 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
276 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
284 /****************************************************************************/
285 #if( defined __GNUC__ && defined __ia64__ )
287 /* TRD : GCC, Itanium
289 Itanium is CAS, so isolation is cache-line length
292 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
293 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
296 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
298 typedef int long long unsigned lfds700_pal_atom_t;
299 typedef int long long unsigned lfds700_pal_uint_t;
301 #define LFDS700_PAL_PROCESSOR_STRING "IA64"
303 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
304 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
306 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
307 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
315 /****************************************************************************/
316 #if( defined __GNUC__ && defined __mips__ )
318 /* TRD : GCC, MIPS (32-bit)
320 MIPS is LL/SC, but there is only one reservation per processor,
321 so the isolation value used here is cache-line length
324 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
325 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
328 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
330 typedef int long unsigned lfds700_pal_atom_t;
331 typedef int long unsigned lfds700_pal_uint_t;
333 #define LFDS700_PAL_PROCESSOR_STRING "MIPS (32-bit)"
335 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
336 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
338 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
339 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 32
347 /****************************************************************************/
348 #if( defined __GNUC__ && defined __mips64 )
350 /* TRD : GCC, MIPS (64-bit)
352 MIPS is LL/SC, but there is only one reservation per processor,
353 so the isolation value used here is cache-line length
356 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
357 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
360 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
362 typedef int long long unsigned lfds700_pal_atom_t;
363 typedef int long long unsigned lfds700_pal_uint_t;
365 #define LFDS700_PAL_PROCESSOR_STRING "MIPS (64-bit)"
367 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
368 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
370 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
371 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
379 /****************************************************************************/
380 #if( defined __GNUC__ && defined __ppc__ )
382 /* TRD : GCC, POWERPC (32-bit)
384 POWERPC is LL/SC and uses a reservation granule but I can't find
385 canonical documentation for its size - 128 bytes seems to be the
386 largest value I've found
389 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
390 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
393 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
395 typedef int long unsigned lfds700_pal_atom_t;
396 typedef int long unsigned lfds700_pal_uint_t;
398 #define LFDS700_PAL_PROCESSOR_STRING "POWERPC (32-bit)"
400 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
401 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
403 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
404 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 128
412 /****************************************************************************/
413 #if( defined __GNUC__ && defined __ppc64__ )
415 /* TRD : GCC, POWERPC (64-bit)
417 POWERPC is LL/SC and uses a reservation granule but I can't find
418 canonical documentation for its size - 128 bytes seems to be the
419 largest value I've found
422 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
423 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
426 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
428 typedef int long long unsigned lfds700_pal_atom_t;
429 typedef int long long unsigned lfds700_pal_uint_t;
431 #define LFDS700_PAL_PROCESSOR_STRING "POWERPC (64-bit)"
433 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
434 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
436 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
437 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 128
445 /****************************************************************************/
446 #if( defined __GNUC__ && defined __sparc__ && !defined __sparc_v9__ )
448 /* TRD : GCC, SPARC (32-bit)
450 SPARC is CAS, so isolation is cache-line length
453 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
454 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
457 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
459 typedef int long unsigned lfds700_pal_atom_t;
460 typedef int long unsigned lfds700_pal_uint_t;
462 #define LFDS700_PAL_PROCESSOR_STRING "SPARC (32-bit)"
464 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
465 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
467 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
468 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 32
476 /****************************************************************************/
477 #if( defined __GNUC__ && defined __sparc__ && defined __sparc_v9__ )
479 /* TRD : GCC, SPARC (64-bit)
481 SPARC is CAS, so isolation is cache-line length
484 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
485 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
488 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
490 typedef int long long unsigned lfds700_pal_atom_t;
491 typedef int long long unsigned lfds700_pal_uint_t;
493 #define LFDS700_PAL_PROCESSOR_STRING "SPARC (64-bit)"
495 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 8
496 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 16
498 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 64
499 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 64
507 /****************************************************************************/
508 #if( defined __GNUC__ && defined __m68k__ )
512 680x0 is CAS, so isolation is cache-line length
515 #ifdef LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
516 #error More than one porting abstraction layer matches the current platform in lfds700_porting_abstraction_layer_processor.h
519 #define LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR
521 typedef int long unsigned lfds700_pal_atom_t;
522 typedef int long unsigned lfds700_pal_uint_t;
524 #define LFDS700_PAL_PROCESSOR_STRING "680x0"
526 #define LFDS700_PAL_ALIGN_SINGLE_POINTER 4
527 #define LFDS700_PAL_ALIGN_DOUBLE_POINTER 8
529 #define LFDS700_PAL_CACHE_LINE_LENGTH_IN_BYTES 32
530 #define LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES 32
538 /****************************************************************************/
539 #if( !defined LFDS700_PAL_PORTING_ABSTRACTION_LAYER_PROCESSOR )
541 #error No matching porting abstraction layer in lfds700_porting_abstraction_layer_processor.h