< prev index next >

src/hotspot/cpu/x86/gc/z/zGlobals_x86.cpp

Print this page
rev 56944 : imported patch 8233702-function-to-clamp-value-to-range


 127 //  |                  |    |
 128 //  |                  |    * 43-0 Object Offset (44-bits, 16TB address space)
 129 //  |                  |
 130 //  |                  * 47-44 Metadata Bits (4-bits)  0001 = Marked0      (Address view 16-32TB)
 131 //  |                                                  0010 = Marked1      (Address view 32-48TB)
 132 //  |                                                  0100 = Remapped     (Address view 64-80TB)
 133 //  |                                                  1000 = Finalizable  (Address view N/A)
 134 //  |
 135 //  * 63-48 Fixed (16-bits, always zero)
 136 //
 137 
 138 uintptr_t ZPlatformAddressBase() {
 139   return 0;
 140 }
 141 
 142 size_t ZPlatformAddressOffsetBits() {
 143   const size_t min_address_offset_bits = 42; // 4TB
 144   const size_t max_address_offset_bits = 44; // 16TB
 145   const size_t address_offset = ZUtils::round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
 146   const size_t address_offset_bits = log2_intptr(address_offset);
 147   return MIN2(MAX2(address_offset_bits, min_address_offset_bits), max_address_offset_bits);
 148 }
 149 
 150 size_t ZPlatformAddressMetadataShift() {
 151   return ZPlatformAddressOffsetBits();
 152 }


 127 //  |                  |    |
 128 //  |                  |    * 43-0 Object Offset (44-bits, 16TB address space)
 129 //  |                  |
 130 //  |                  * 47-44 Metadata Bits (4-bits)  0001 = Marked0      (Address view 16-32TB)
 131 //  |                                                  0010 = Marked1      (Address view 32-48TB)
 132 //  |                                                  0100 = Remapped     (Address view 64-80TB)
 133 //  |                                                  1000 = Finalizable  (Address view N/A)
 134 //  |
 135 //  * 63-48 Fixed (16-bits, always zero)
 136 //
 137 
 138 uintptr_t ZPlatformAddressBase() {
 139   return 0;
 140 }
 141 
 142 size_t ZPlatformAddressOffsetBits() {
 143   const size_t min_address_offset_bits = 42; // 4TB
 144   const size_t max_address_offset_bits = 44; // 16TB
 145   const size_t address_offset = ZUtils::round_up_power_of_2(MaxHeapSize * ZVirtualToPhysicalRatio);
 146   const size_t address_offset_bits = log2_intptr(address_offset);
 147   return clamp(address_offset_bits, min_address_offset_bits, max_address_offset_bits);
 148 }
 149 
 150 size_t ZPlatformAddressMetadataShift() {
 151   return ZPlatformAddressOffsetBits();
 152 }
< prev index next >