< prev index next >

src/share/vm/jvmci/vmStructs_jvmci.cpp

Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett


 574   declare_function(JVMCIRuntime::vm_error) \
 575   declare_function(JVMCIRuntime::load_and_clear_exception) \
 576   declare_function(JVMCIRuntime::write_barrier_pre) \
 577   declare_function(JVMCIRuntime::write_barrier_post) \
 578   declare_function(JVMCIRuntime::validate_object) \
 579   \
 580   declare_function(JVMCIRuntime::test_deoptimize_call_int)
 581 
 582 
 583 #if INCLUDE_ALL_GCS
 584 
 585 #define VM_STRUCTS_G1(nonstatic_field, static_field) \
 586   static_field(HeapRegion, LogOfHRGrainBytes, int)
 587 
 588 #define VM_INT_CONSTANTS_G1(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \
 589   declare_constant_with_value("G1SATBCardTableModRefBS::g1_young_gen", G1SATBCardTableModRefBS::g1_young_card_val())
 590 
 591 #endif // INCLUDE_ALL_GCS
 592 
 593 
 594 #ifdef TARGET_OS_FAMILY_linux
 595 
 596 #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \
 597   declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)
 598 
 599 #endif // TARGET_OS_FAMILY_linux
 600 
 601 
 602 #ifdef TARGET_OS_FAMILY_bsd
 603 
 604 #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \
 605   declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)
 606 
 607 #endif // TARGET_OS_FAMILY_bsd
 608 
 609 

 610 #ifdef TARGET_ARCH_aarch64
 611 
 612 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
 613   volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)
 614 
 615 #endif // TARGET_ARCH_aarch64
 616 
 617 
 618 #ifdef TARGET_ARCH_x86
 619 
 620 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
 621   volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)
 622 
 623 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
 624   LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes))       \
 625   declare_constant(frame::interpreter_frame_sender_sp_offset)       \
 626   declare_constant(frame::interpreter_frame_last_sp_offset)         \
 627   declare_constant(VM_Version::CPU_CX8)                             \
 628   declare_constant(VM_Version::CPU_CMOV)                            \
 629   declare_constant(VM_Version::CPU_FXSR)                            \
 630   declare_constant(VM_Version::CPU_HT)                              \
 631   declare_constant(VM_Version::CPU_MMX)                             \
 632   declare_constant(VM_Version::CPU_3DNOW_PREFETCH)                  \
 633   declare_constant(VM_Version::CPU_SSE)                             \
 634   declare_constant(VM_Version::CPU_SSE2)                            \
 635   declare_constant(VM_Version::CPU_SSE3)                            \
 636   declare_constant(VM_Version::CPU_SSSE3)                           \
 637   declare_constant(VM_Version::CPU_SSE4A)                           \
 638   declare_constant(VM_Version::CPU_SSE4_1)                          \


 644   declare_constant(VM_Version::CPU_AVX)                             \
 645   declare_constant(VM_Version::CPU_AVX2)                            \
 646   declare_constant(VM_Version::CPU_AES)                             \
 647   declare_constant(VM_Version::CPU_ERMS)                            \
 648   declare_constant(VM_Version::CPU_CLMUL)                           \
 649   declare_constant(VM_Version::CPU_BMI1)                            \
 650   declare_constant(VM_Version::CPU_BMI2)                            \
 651   declare_constant(VM_Version::CPU_RTM)                             \
 652   declare_constant(VM_Version::CPU_ADX)                             \
 653   declare_constant(VM_Version::CPU_AVX512F)                         \
 654   declare_constant(VM_Version::CPU_AVX512DQ)                        \
 655   declare_constant(VM_Version::CPU_AVX512PF)                        \
 656   declare_constant(VM_Version::CPU_AVX512ER)                        \
 657   declare_constant(VM_Version::CPU_AVX512CD)
 658 
 659 #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
 660   declare_preprocessor_constant("VM_Version::CPU_AVX512BW", CPU_AVX512BW) \
 661   declare_preprocessor_constant("VM_Version::CPU_AVX512VL", CPU_AVX512VL) \
 662   declare_preprocessor_constant("VM_Version::CPU_SHA", CPU_SHA)
 663 
 664 #endif // TARGET_ARCH_x86
 665 
 666 
 667 #ifdef TARGET_ARCH_sparc
 668 
 669 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
 670   volatile_nonstatic_field(JavaFrameAnchor, _flags, int)
 671 
 672 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
 673   declare_constant(VM_Version::vis1_instructions_m)                       \
 674   declare_constant(VM_Version::vis2_instructions_m)                       \
 675   declare_constant(VM_Version::vis3_instructions_m)                       \
 676   declare_constant(VM_Version::cbcond_instructions_m)                     \
 677   declare_constant(VM_Version::v8_instructions_m)                         \
 678   declare_constant(VM_Version::hardware_mul32_m)                          \
 679   declare_constant(VM_Version::hardware_div32_m)                          \
 680   declare_constant(VM_Version::hardware_fsmuld_m)                         \
 681   declare_constant(VM_Version::hardware_popc_m)                           \
 682   declare_constant(VM_Version::v9_instructions_m)                         \
 683   declare_constant(VM_Version::sun4v_m)                                   \
 684   declare_constant(VM_Version::blk_init_instructions_m)                   \
 685   declare_constant(VM_Version::fmaf_instructions_m)                       \
 686   declare_constant(VM_Version::fmau_instructions_m)                       \
 687   declare_constant(VM_Version::sparc64_family_m)                          \
 688   declare_constant(VM_Version::M_family_m)                                \
 689   declare_constant(VM_Version::T_family_m)                                \
 690   declare_constant(VM_Version::T1_model_m)                                \
 691   declare_constant(VM_Version::sparc5_instructions_m)                     \
 692   declare_constant(VM_Version::aes_instructions_m)                        \
 693   declare_constant(VM_Version::sha1_instruction_m)                        \
 694   declare_constant(VM_Version::sha256_instruction_m)                      \
 695   declare_constant(VM_Version::sha512_instruction_m)
 696 
 697 #endif // TARGET_ARCH_sparc
 698 
 699 
 700 /*
 701  * Dummy defines for architectures that don't use these.
 702  */
 703 #ifndef VM_STRUCTS_CPU
 704 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)
 705 #endif
 706 
 707 #ifndef VM_TYPES_CPU
 708 #define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
 709 #endif
 710 
 711 #ifndef VM_INT_CONSTANTS_CPU
 712 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
 713 #endif
 714 
 715 #ifndef VM_LONG_CONSTANTS_CPU
 716 #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
 717 #endif




 574   declare_function(JVMCIRuntime::vm_error) \
 575   declare_function(JVMCIRuntime::load_and_clear_exception) \
 576   declare_function(JVMCIRuntime::write_barrier_pre) \
 577   declare_function(JVMCIRuntime::write_barrier_post) \
 578   declare_function(JVMCIRuntime::validate_object) \
 579   \
 580   declare_function(JVMCIRuntime::test_deoptimize_call_int)
 581 
 582 
 583 #if INCLUDE_ALL_GCS
 584 
 585 #define VM_STRUCTS_G1(nonstatic_field, static_field) \
 586   static_field(HeapRegion, LogOfHRGrainBytes, int)
 587 
 588 #define VM_INT_CONSTANTS_G1(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \
 589   declare_constant_with_value("G1SATBCardTableModRefBS::g1_young_gen", G1SATBCardTableModRefBS::g1_young_card_val())
 590 
 591 #endif // INCLUDE_ALL_GCS
 592 
 593 
 594 #ifdef LINUX
 595 
 596 #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \
 597   declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)
 598 
 599 #endif
 600 
 601 
 602 #ifdef BSD
 603 
 604 #define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \
 605   declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)
 606 
 607 #endif

 608 
 609 // AARCH64 is defined in closed port, too. TARGET_ARCH_aarch64 is not.
 610 #ifdef TARGET_ARCH_aarch64
 611 
 612 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
 613   volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)
 614 
 615 #endif
 616 
 617 
 618 #ifdef X86
 619 
 620 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
 621   volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)
 622 
 623 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
 624   LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes))       \
 625   declare_constant(frame::interpreter_frame_sender_sp_offset)       \
 626   declare_constant(frame::interpreter_frame_last_sp_offset)         \
 627   declare_constant(VM_Version::CPU_CX8)                             \
 628   declare_constant(VM_Version::CPU_CMOV)                            \
 629   declare_constant(VM_Version::CPU_FXSR)                            \
 630   declare_constant(VM_Version::CPU_HT)                              \
 631   declare_constant(VM_Version::CPU_MMX)                             \
 632   declare_constant(VM_Version::CPU_3DNOW_PREFETCH)                  \
 633   declare_constant(VM_Version::CPU_SSE)                             \
 634   declare_constant(VM_Version::CPU_SSE2)                            \
 635   declare_constant(VM_Version::CPU_SSE3)                            \
 636   declare_constant(VM_Version::CPU_SSSE3)                           \
 637   declare_constant(VM_Version::CPU_SSE4A)                           \
 638   declare_constant(VM_Version::CPU_SSE4_1)                          \


 644   declare_constant(VM_Version::CPU_AVX)                             \
 645   declare_constant(VM_Version::CPU_AVX2)                            \
 646   declare_constant(VM_Version::CPU_AES)                             \
 647   declare_constant(VM_Version::CPU_ERMS)                            \
 648   declare_constant(VM_Version::CPU_CLMUL)                           \
 649   declare_constant(VM_Version::CPU_BMI1)                            \
 650   declare_constant(VM_Version::CPU_BMI2)                            \
 651   declare_constant(VM_Version::CPU_RTM)                             \
 652   declare_constant(VM_Version::CPU_ADX)                             \
 653   declare_constant(VM_Version::CPU_AVX512F)                         \
 654   declare_constant(VM_Version::CPU_AVX512DQ)                        \
 655   declare_constant(VM_Version::CPU_AVX512PF)                        \
 656   declare_constant(VM_Version::CPU_AVX512ER)                        \
 657   declare_constant(VM_Version::CPU_AVX512CD)
 658 
 659 #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
 660   declare_preprocessor_constant("VM_Version::CPU_AVX512BW", CPU_AVX512BW) \
 661   declare_preprocessor_constant("VM_Version::CPU_AVX512VL", CPU_AVX512VL) \
 662   declare_preprocessor_constant("VM_Version::CPU_SHA", CPU_SHA)
 663 
 664 #endif
 665 
 666 
 667 #ifdef SPARC
 668 
 669 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \
 670   volatile_nonstatic_field(JavaFrameAnchor, _flags, int)
 671 
 672 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
 673   declare_constant(VM_Version::vis1_instructions_m)                       \
 674   declare_constant(VM_Version::vis2_instructions_m)                       \
 675   declare_constant(VM_Version::vis3_instructions_m)                       \
 676   declare_constant(VM_Version::cbcond_instructions_m)                     \
 677   declare_constant(VM_Version::v8_instructions_m)                         \
 678   declare_constant(VM_Version::hardware_mul32_m)                          \
 679   declare_constant(VM_Version::hardware_div32_m)                          \
 680   declare_constant(VM_Version::hardware_fsmuld_m)                         \
 681   declare_constant(VM_Version::hardware_popc_m)                           \
 682   declare_constant(VM_Version::v9_instructions_m)                         \
 683   declare_constant(VM_Version::sun4v_m)                                   \
 684   declare_constant(VM_Version::blk_init_instructions_m)                   \
 685   declare_constant(VM_Version::fmaf_instructions_m)                       \
 686   declare_constant(VM_Version::fmau_instructions_m)                       \
 687   declare_constant(VM_Version::sparc64_family_m)                          \
 688   declare_constant(VM_Version::M_family_m)                                \
 689   declare_constant(VM_Version::T_family_m)                                \
 690   declare_constant(VM_Version::T1_model_m)                                \
 691   declare_constant(VM_Version::sparc5_instructions_m)                     \
 692   declare_constant(VM_Version::aes_instructions_m)                        \
 693   declare_constant(VM_Version::sha1_instruction_m)                        \
 694   declare_constant(VM_Version::sha256_instruction_m)                      \
 695   declare_constant(VM_Version::sha512_instruction_m)
 696 
 697 #endif
 698 
 699 
 700 /*
 701  * Dummy defines for architectures that don't use these.
 702  */
 703 #ifndef VM_STRUCTS_CPU
 704 #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)
 705 #endif
 706 
 707 #ifndef VM_TYPES_CPU
 708 #define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type)
 709 #endif
 710 
 711 #ifndef VM_INT_CONSTANTS_CPU
 712 #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
 713 #endif
 714 
 715 #ifndef VM_LONG_CONSTANTS_CPU
 716 #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)
 717 #endif


< prev index next >