Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
642:660978a2a31a | 643:c771b7f43bbf |
---|---|
27 enum Feature_Flag { | 27 enum Feature_Flag { |
28 v8_instructions = 0, | 28 v8_instructions = 0, |
29 hardware_mul32 = 1, | 29 hardware_mul32 = 1, |
30 hardware_div32 = 2, | 30 hardware_div32 = 2, |
31 hardware_fsmuld = 3, | 31 hardware_fsmuld = 3, |
32 v9_instructions = 4, | 32 hardware_popc = 4, |
33 vis1_instructions = 5, | 33 v9_instructions = 5, |
34 vis2_instructions = 6, | 34 vis1_instructions = 6, |
35 sun4v_instructions = 7 | 35 vis2_instructions = 7, |
36 sun4v_instructions = 8 | |
36 }; | 37 }; |
37 | 38 |
38 enum Feature_Flag_Set { | 39 enum Feature_Flag_Set { |
39 unknown_m = 0, | 40 unknown_m = 0, |
40 all_features_m = -1, | 41 all_features_m = -1, |
41 | 42 |
42 v8_instructions_m = 1 << v8_instructions, | 43 v8_instructions_m = 1 << v8_instructions, |
43 hardware_mul32_m = 1 << hardware_mul32, | 44 hardware_mul32_m = 1 << hardware_mul32, |
44 hardware_div32_m = 1 << hardware_div32, | 45 hardware_div32_m = 1 << hardware_div32, |
45 hardware_fsmuld_m = 1 << hardware_fsmuld, | 46 hardware_fsmuld_m = 1 << hardware_fsmuld, |
47 hardware_popc_m = 1 << hardware_popc, | |
46 v9_instructions_m = 1 << v9_instructions, | 48 v9_instructions_m = 1 << v9_instructions, |
47 vis1_instructions_m = 1 << vis1_instructions, | 49 vis1_instructions_m = 1 << vis1_instructions, |
48 vis2_instructions_m = 1 << vis2_instructions, | 50 vis2_instructions_m = 1 << vis2_instructions, |
49 sun4v_m = 1 << sun4v_instructions, | 51 sun4v_m = 1 << sun4v_instructions, |
50 | 52 |
79 static bool has_v8() { return (_features & v8_instructions_m) != 0; } | 81 static bool has_v8() { return (_features & v8_instructions_m) != 0; } |
80 static bool has_v9() { return (_features & v9_instructions_m) != 0; } | 82 static bool has_v9() { return (_features & v9_instructions_m) != 0; } |
81 static bool has_hardware_mul32() { return (_features & hardware_mul32_m) != 0; } | 83 static bool has_hardware_mul32() { return (_features & hardware_mul32_m) != 0; } |
82 static bool has_hardware_div32() { return (_features & hardware_div32_m) != 0; } | 84 static bool has_hardware_div32() { return (_features & hardware_div32_m) != 0; } |
83 static bool has_hardware_fsmuld() { return (_features & hardware_fsmuld_m) != 0; } | 85 static bool has_hardware_fsmuld() { return (_features & hardware_fsmuld_m) != 0; } |
86 static bool has_hardware_popc() { return (_features & hardware_popc_m) != 0; } | |
84 static bool has_vis1() { return (_features & vis1_instructions_m) != 0; } | 87 static bool has_vis1() { return (_features & vis1_instructions_m) != 0; } |
85 static bool has_vis2() { return (_features & vis2_instructions_m) != 0; } | 88 static bool has_vis2() { return (_features & vis2_instructions_m) != 0; } |
86 | 89 |
87 static bool supports_compare_and_exchange() | 90 static bool supports_compare_and_exchange() |
88 { return has_v9(); } | 91 { return has_v9(); } |