336 extern int LogMinObjAlignmentInBytes; 337 338 // Machine dependent stuff 339 340 #ifdef TARGET_ARCH_x86 341 # include "globalDefinitions_x86.hpp" 342 #endif 343 #ifdef TARGET_ARCH_sparc 344 # include "globalDefinitions_sparc.hpp" 345 #endif 346 #ifdef TARGET_ARCH_zero 347 # include "globalDefinitions_zero.hpp" 348 #endif 349 #ifdef TARGET_ARCH_arm 350 # include "globalDefinitions_arm.hpp" 351 #endif 352 #ifdef TARGET_ARCH_ppc 353 # include "globalDefinitions_ppc.hpp" 354 #endif 355 356 357 // The byte alignment to be used by Arena::Amalloc. See bugid 4169348. 358 // Note: this value must be a power of 2 359 360 #define ARENA_AMALLOC_ALIGNMENT (2*BytesPerWord) 361 362 // Signed variants of alignment helpers. There are two versions of each, a macro 363 // for use in places like enum definitions that require compile-time constant 364 // expressions and a function for all other places so as to get type checking. 365 366 #define align_size_up_(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1)) 367 368 inline intptr_t align_size_up(intptr_t size, intptr_t alignment) { 369 return align_size_up_(size, alignment); 370 } 371 372 #define align_size_down_(size, alignment) ((size) & ~((alignment) - 1)) 373 374 inline intptr_t align_size_down(intptr_t size, intptr_t alignment) { 375 return align_size_down_(size, alignment); | 336 extern int LogMinObjAlignmentInBytes; 337 338 // Machine dependent stuff 339 340 #ifdef TARGET_ARCH_x86 341 # include "globalDefinitions_x86.hpp" 342 #endif 343 #ifdef TARGET_ARCH_sparc 344 # include "globalDefinitions_sparc.hpp" 345 #endif 346 #ifdef TARGET_ARCH_zero 347 # include "globalDefinitions_zero.hpp" 348 #endif 349 #ifdef TARGET_ARCH_arm 350 # include "globalDefinitions_arm.hpp" 351 #endif 352 #ifdef TARGET_ARCH_ppc 353 # include "globalDefinitions_ppc.hpp" 354 #endif 355 356 /* 357 * If a platform does not support NMT_detail 358 * the platform specific globalDefinitions (above) 359 * can set PLATFORM_NMT_DETAIL_SUPPORTED to false 360 */ 361 #ifndef PLATFORM_NMT_DETAIL_SUPPORTED 362 #define PLATFORM_NMT_DETAIL_SUPPORTED true 363 #endif 364 365 // The byte alignment to be used by Arena::Amalloc. See bugid 4169348. 366 // Note: this value must be a power of 2 367 368 #define ARENA_AMALLOC_ALIGNMENT (2*BytesPerWord) 369 370 // Signed variants of alignment helpers. There are two versions of each, a macro 371 // for use in places like enum definitions that require compile-time constant 372 // expressions and a function for all other places so as to get type checking. 373 374 #define align_size_up_(size, alignment) (((size) + ((alignment) - 1)) & ~((alignment) - 1)) 375 376 inline intptr_t align_size_up(intptr_t size, intptr_t alignment) { 377 return align_size_up_(size, alignment); 378 } 379 380 #define align_size_down_(size, alignment) ((size) & ~((alignment) - 1)) 381 382 inline intptr_t align_size_down(intptr_t size, intptr_t alignment) { 383 return align_size_down_(size, alignment); |