changeset 3236:21b94feb697c

Merge
author collins
date Tue, 13 Mar 2012 15:37:50 -0700
parents f7c4174b33ba 61b82be3b1ff
children 6522ad563f99
files
diffstat 4 files changed, 20 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/sparc.ad	Tue Mar 13 13:50:48 2012 -0400
+++ b/src/cpu/sparc/vm/sparc.ad	Tue Mar 13 15:37:50 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/src/cpu/x86/vm/x86_32.ad	Tue Mar 13 13:50:48 2012 -0400
+++ b/src/cpu/x86/vm/x86_32.ad	Tue Mar 13 15:37:50 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/src/cpu/x86/vm/x86_64.ad	Tue Mar 13 13:50:48 2012 -0400
+++ b/src/cpu/x86/vm/x86_64.ad	Tue Mar 13 15:37:50 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/src/share/vm/opto/library_call.cpp	Tue Mar 13 13:50:48 2012 -0400
+++ b/src/share/vm/opto/library_call.cpp	Tue Mar 13 15:37:50 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: