Mercurial > hg > truffle
comparison src/cpu/x86/vm/vm_version_x86.cpp @ 775:93c14e5562c4
6823354: Add intrinsics for {Integer,Long}.{numberOfLeadingZeros,numberOfTrailingZeros}()
Summary: These methods can be instrinsified by using bit scan, bit test, and population count instructions.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Wed, 06 May 2009 00:27:52 -0700 |
parents | fbde8ec322d0 |
children | 323bd24c6520 |
comparison
equal
deleted
inserted
replaced
755:36ee9b69616e | 775:93c14e5562c4 |
---|---|
282 // HT processor could be installed on a system which doesn't support HT. | 282 // HT processor could be installed on a system which doesn't support HT. |
283 _cpuFeatures &= ~CPU_HT; | 283 _cpuFeatures &= ~CPU_HT; |
284 } | 284 } |
285 | 285 |
286 char buf[256]; | 286 char buf[256]; |
287 jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", | 287 jio_snprintf(buf, sizeof(buf), "(%u cores per cpu, %u threads per core) family %d model %d stepping %d%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
288 cores_per_cpu(), threads_per_core(), | 288 cores_per_cpu(), threads_per_core(), |
289 cpu_family(), _model, _stepping, | 289 cpu_family(), _model, _stepping, |
290 (supports_cmov() ? ", cmov" : ""), | 290 (supports_cmov() ? ", cmov" : ""), |
291 (supports_cmpxchg8() ? ", cx8" : ""), | 291 (supports_cmpxchg8() ? ", cx8" : ""), |
292 (supports_fxsr() ? ", fxsr" : ""), | 292 (supports_fxsr() ? ", fxsr" : ""), |
299 (supports_sse4_2() ? ", sse4.2" : ""), | 299 (supports_sse4_2() ? ", sse4.2" : ""), |
300 (supports_popcnt() ? ", popcnt" : ""), | 300 (supports_popcnt() ? ", popcnt" : ""), |
301 (supports_mmx_ext() ? ", mmxext" : ""), | 301 (supports_mmx_ext() ? ", mmxext" : ""), |
302 (supports_3dnow() ? ", 3dnow" : ""), | 302 (supports_3dnow() ? ", 3dnow" : ""), |
303 (supports_3dnow2() ? ", 3dnowext" : ""), | 303 (supports_3dnow2() ? ", 3dnowext" : ""), |
304 (supports_lzcnt() ? ", lzcnt": ""), | |
304 (supports_sse4a() ? ", sse4a": ""), | 305 (supports_sse4a() ? ", sse4a": ""), |
305 (supports_ht() ? ", ht": "")); | 306 (supports_ht() ? ", ht": "")); |
306 _features_str = strdup(buf); | 307 _features_str = strdup(buf); |
307 | 308 |
308 // UseSSE is set to the smaller of what hardware supports and what | 309 // UseSSE is set to the smaller of what hardware supports and what |
360 if( FLAG_IS_DEFAULT(UseXmmI2D) ) { | 361 if( FLAG_IS_DEFAULT(UseXmmI2D) ) { |
361 if( supports_sse4a() ) { | 362 if( supports_sse4a() ) { |
362 UseXmmI2D = true; | 363 UseXmmI2D = true; |
363 } else { | 364 } else { |
364 UseXmmI2D = false; | 365 UseXmmI2D = false; |
366 } | |
367 } | |
368 | |
369 // Use count leading zeros count instruction if available. | |
370 if (supports_lzcnt()) { | |
371 if (FLAG_IS_DEFAULT(UseCountLeadingZerosInstruction)) { | |
372 UseCountLeadingZerosInstruction = true; | |
365 } | 373 } |
366 } | 374 } |
367 } | 375 } |
368 | 376 |
369 if( is_intel() ) { // Intel cpus specific settings | 377 if( is_intel() ) { // Intel cpus specific settings |