diff src/cpu/sparc/vm/vm_version_sparc.hpp @ 643:c771b7f43bbf

6378821: bitCount() should use POPC on SPARC processors and AMD+10h Summary: bitCount() should use POPC on SPARC processors where POPC is implemented directly in hardware. Reviewed-by: kvn, never
author twisti
date Fri, 13 Mar 2009 11:35:17 -0700
parents 6af0a709d52b
children c18cbe5936b8
line wrap: on
line diff
--- a/src/cpu/sparc/vm/vm_version_sparc.hpp	Thu Mar 12 10:37:46 2009 -0700
+++ b/src/cpu/sparc/vm/vm_version_sparc.hpp	Fri Mar 13 11:35:17 2009 -0700
@@ -29,10 +29,11 @@
     hardware_mul32     = 1,
     hardware_div32     = 2,
     hardware_fsmuld    = 3,
-    v9_instructions    = 4,
-    vis1_instructions  = 5,
-    vis2_instructions  = 6,
-    sun4v_instructions = 7
+    hardware_popc      = 4,
+    v9_instructions    = 5,
+    vis1_instructions  = 6,
+    vis2_instructions  = 7,
+    sun4v_instructions = 8
   };
 
   enum Feature_Flag_Set {
@@ -43,6 +44,7 @@
     hardware_mul32_m    = 1 << hardware_mul32,
     hardware_div32_m    = 1 << hardware_div32,
     hardware_fsmuld_m   = 1 << hardware_fsmuld,
+    hardware_popc_m     = 1 << hardware_popc,
     v9_instructions_m   = 1 << v9_instructions,
     vis1_instructions_m = 1 << vis1_instructions,
     vis2_instructions_m = 1 << vis2_instructions,
@@ -81,6 +83,7 @@
   static bool has_hardware_mul32()      { return (_features & hardware_mul32_m) != 0; }
   static bool has_hardware_div32()      { return (_features & hardware_div32_m) != 0; }
   static bool has_hardware_fsmuld()     { return (_features & hardware_fsmuld_m) != 0; }
+  static bool has_hardware_popc()       { return (_features & hardware_popc_m) != 0; }
   static bool has_vis1()                { return (_features & vis1_instructions_m) != 0; }
   static bool has_vis2()                { return (_features & vis2_instructions_m) != 0; }