7152957: VM crashes with assert(false) failed: bad AD file
authornever
Mon, 12 Mar 2012 15:28:07 -0700
changeset 12113 71f302d5c8ee
parent 12112 56e3093129dc
child 12114 9a825a536095
child 12159 714449dc1f6d
child 12232 fc5677ba9c3f
7152957: VM crashes with assert(false) failed: bad AD file Reviewed-by: kvn, never Contributed-by: nils.eliasson@oracle.com
hotspot/src/cpu/sparc/vm/sparc.ad
hotspot/src/cpu/x86/vm/x86_32.ad
hotspot/src/cpu/x86/vm/x86_64.ad
hotspot/src/share/vm/opto/library_call.cpp
--- a/hotspot/src/cpu/sparc/vm/sparc.ad	Fri Mar 09 13:34:45 2012 -0800
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad	Mon Mar 12 15:28:07 2012 -0700
@@ -1832,6 +1832,8 @@
   case Op_CountLeadingZerosL:
   case Op_CountTrailingZerosI:
   case Op_CountTrailingZerosL:
+  case Op_PopCountI:
+  case Op_PopCountL:
     if (!UsePopCountInstruction)
       return false;
     break;
--- a/hotspot/src/cpu/x86/vm/x86_32.ad	Fri Mar 09 13:34:45 2012 -0800
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad	Mon Mar 12 15:28:07 2012 -0700
@@ -1293,6 +1293,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.
 }
 
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Fri Mar 09 13:34:45 2012 -0800
+++ b/hotspot/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.
 }
 
--- a/hotspot/src/share/vm/opto/library_call.cpp	Fri Mar 09 13:34:45 2012 -0800
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Mon Mar 12 15:28:07 2012 -0700
@@ -338,11 +338,11 @@
     break;
 
   case vmIntrinsics::_bitCount_i:
-    if (!Matcher::has_match_rule(Op_PopCountI)) return NULL;
+    if (!Matcher::match_rule_supported(Op_PopCountI)) return NULL;
     break;
 
   case vmIntrinsics::_bitCount_l:
-    if (!Matcher::has_match_rule(Op_PopCountL)) return NULL;
+    if (!Matcher::match_rule_supported(Op_PopCountL)) return NULL;
     break;
 
   case vmIntrinsics::_numberOfLeadingZeros_i: