src/cpu/x86/vm/x86_32.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

*** 1291,1300 **** --- 1291,1308 ---- 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) { return regnum - 32; // The FP registers are in the second chunk