src/hotspot/cpu/x86/macroAssembler_x86.cpp
changeset 47683 f433d49aceb4
parent 47580 96392e113a0a
child 47765 b7c7428eaab9
--- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Mon Oct 23 10:45:07 2017 +0000
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp	Mon Oct 23 09:33:14 2017 -0400
@@ -2783,6 +2783,21 @@
 #endif // _LP64
 }
 
+void MacroAssembler::cmpoop(Register src1, Register src2) {
+  cmpptr(src1, src2);
+}
+
+void MacroAssembler::cmpoop(Register src1, Address src2) {
+  cmpptr(src1, src2);
+}
+
+#ifdef _LP64
+void MacroAssembler::cmpoop(Register src1, jobject src2) {
+  movoop(rscratch1, src2);
+  cmpptr(src1, rscratch1);
+}
+#endif
+
 void MacroAssembler::locked_cmpxchgptr(Register reg, AddressLiteral adr) {
   if (reachable(adr)) {
     if (os::is_MP())
@@ -8399,7 +8414,7 @@
 
   if (is_array_equ) {
     // Check the input args
-    cmpptr(ary1, ary2);
+    cmpoop(ary1, ary2);
     jcc(Assembler::equal, TRUE_LABEL);
 
     // Need additional checks for arrays_equals.