mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
6378821: bitCount() should use POPC on SPARC processors and AMD+10h
BitCount() should use POPC on SPARC processors where POPC is implemented directly in hardware. Reviewed-by: kvn, never
This commit is contained in:
parent
69f9ddee90
commit
de67e52949
16 changed files with 370 additions and 20 deletions
|
@ -92,10 +92,18 @@ void VM_Version::initialize() {
|
|||
#endif
|
||||
}
|
||||
|
||||
// Use hardware population count instruction if available.
|
||||
if (has_hardware_popc()) {
|
||||
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
|
||||
UsePopCountInstruction = true;
|
||||
}
|
||||
}
|
||||
|
||||
char buf[512];
|
||||
jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s",
|
||||
jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
(has_v8() ? ", has_v8" : ""),
|
||||
(has_v9() ? ", has_v9" : ""),
|
||||
(has_hardware_popc() ? ", popc" : ""),
|
||||
(has_vis1() ? ", has_vis1" : ""),
|
||||
(has_vis2() ? ", has_vis2" : ""),
|
||||
(is_ultra3() ? ", is_ultra3" : ""),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue