163 // Fujitsu SPARC64 164 static bool is_sparc64() { return (_features & sparc64_family_m) != 0; } 165 166 static bool is_sun4v() { return (_features & sun4v_m) != 0; } 167 static bool is_ultra3() { return (_features & ultra3_m) == ultra3_m && !is_sun4v() && !is_sparc64(); } 168 169 static bool has_fast_fxtof() { return is_niagara() || is_sparc64() || has_v9() && !is_ultra3(); } 170 static bool has_fast_idiv() { return is_niagara_plus() || is_sparc64(); } 171 172 // T4 and newer Sparc have fast RDPC instruction. 173 static bool has_fast_rdpc() { return is_T4(); } 174 175 // On T4 and newer Sparc BIS to the beginning of cache line always zeros it. 176 static bool has_block_zeroing() { return has_blk_init() && is_T4(); } 177 178 // default prefetch block size on sparc 179 static intx prefetch_data_size() { return L2_data_cache_line_size(); } 180 181 // Prefetch 182 static intx prefetch_copy_interval_in_bytes() { 183 intx interval = PrefetchCopyIntervalInBytes; 184 return interval >= 0 ? interval : (has_v9() ? 512 : 0); 185 } 186 static intx prefetch_scan_interval_in_bytes() { 187 intx interval = PrefetchScanIntervalInBytes; 188 return interval >= 0 ? interval : (has_v9() ? 512 : 0); 189 } 190 static intx prefetch_fields_ahead() { 191 intx count = PrefetchFieldsAhead; 192 return count >= 0 ? count : (is_ultra3() ? 1 : 0); 193 } 194 195 static intx allocate_prefetch_distance() { 196 // This method should be called before allocate_prefetch_style(). 197 intx count = AllocatePrefetchDistance; 198 if (count < 0) { // default is not defined ? 199 count = 512; 200 } 201 return count; 202 } 203 static intx allocate_prefetch_style() { 204 assert(AllocatePrefetchStyle >= 0, "AllocatePrefetchStyle should be positive"); 205 // Return 0 if AllocatePrefetchDistance was not defined. 206 return AllocatePrefetchDistance > 0 ? AllocatePrefetchStyle : 0; 207 } 208 209 // Assembler testing 210 static void allow_all(); 211 static void revert(); 212 213 // Override the Abstract_VM_Version implementation. 214 static uint page_size_count() { return is_sun4v() ? 4 : 2; } 215 216 // Calculates the number of parallel threads 217 static unsigned int calc_parallel_worker_threads(); 218 }; 219 220 #endif // CPU_SPARC_VM_VM_VERSION_SPARC_HPP | 163 // Fujitsu SPARC64 164 static bool is_sparc64() { return (_features & sparc64_family_m) != 0; } 165 166 static bool is_sun4v() { return (_features & sun4v_m) != 0; } 167 static bool is_ultra3() { return (_features & ultra3_m) == ultra3_m && !is_sun4v() && !is_sparc64(); } 168 169 static bool has_fast_fxtof() { return is_niagara() || is_sparc64() || has_v9() && !is_ultra3(); } 170 static bool has_fast_idiv() { return is_niagara_plus() || is_sparc64(); } 171 172 // T4 and newer Sparc have fast RDPC instruction. 173 static bool has_fast_rdpc() { return is_T4(); } 174 175 // On T4 and newer Sparc BIS to the beginning of cache line always zeros it. 176 static bool has_block_zeroing() { return has_blk_init() && is_T4(); } 177 178 // default prefetch block size on sparc 179 static intx prefetch_data_size() { return L2_data_cache_line_size(); } 180 181 // Prefetch 182 static intx prefetch_copy_interval_in_bytes() { 183 return (has_v9() ? 512 : 0); 184 } 185 static intx prefetch_scan_interval_in_bytes() { 186 return (has_v9() ? 512 : 0); 187 } 188 static intx prefetch_fields_ahead() { 189 return (is_ultra3() ? 1 : 0); 190 } 191 192 // Assembler testing 193 static void allow_all(); 194 static void revert(); 195 196 // Override the Abstract_VM_Version implementation. 197 static uint page_size_count() { return is_sun4v() ? 4 : 2; } 198 199 // Calculates the number of parallel threads 200 static unsigned int calc_parallel_worker_threads(); 201 }; 202 203 #endif // CPU_SPARC_VM_VM_VERSION_SPARC_HPP |