diff src/cpu/x86/vm/x86_64.ad @ 5934:61b82be3b1ff

7152957: VM crashes with assert(false) failed: bad AD file Reviewed-by: kvn, never Contributed-by: nils.eliasson@oracle.com
author never
date Mon, 12 Mar 2012 15:28:07 -0700
parents 9b8ce46870df
children fd09f2d8283e
line wrap: on
line diff
--- a/src/cpu/x86/vm/x86_64.ad	Fri Mar 09 13:34:45 2012 -0800
+++ b/src/cpu/x86/vm/x86_64.ad	Mon Mar 12 15:28:07 2012 -0700
@@ -1714,6 +1714,14 @@
   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.
 }