src/cpu/x86/vm/x86_64.ad
Print this page
rev 3201 : 7153034: Fix of 6658428, emitting popcount on platforms without support
Summary: 6658428 errounously assumed match_rule_supported took hw into account
Reviewed-by:
Contributed-by: nils.eliasson@oracle.com
@@ -1712,10 +1712,18 @@
const bool Matcher::match_rule_supported(int opcode) {
if (!has_match_rule(opcode))
return false;
+ switch (opcode) {
+ case Op_PopCountI:
+ case Op_PopCountL:
+ if (!UsePopCountInstruction)
+ return false;
+ break;
+ }
+
return true; // Per default match rules are supported.
}
int Matcher::regnum_to_fpu_offset(int regnum)
{