8202989: Add missing decorators in calls to to arraycopy_prologue/epilogue
authorpliden
Fri, 18 May 2018 15:21:23 +0200
changeset 50179 d9bc8557ae16
parent 50178 7b0291382aff
child 50180 ffa644980dff
8202989: Add missing decorators in calls to to arraycopy_prologue/epilogue Reviewed-by: stefank, eosterlund
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
src/hotspot/cpu/arm/stubGenerator_arm.cpp
src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
src/hotspot/cpu/s390/stubGenerator_s390.cpp
src/hotspot/cpu/sparc/stubGenerator_sparc.cpp
src/hotspot/cpu/x86/stubGenerator_x86_32.cpp
src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp	Fri May 18 15:21:23 2018 +0200
@@ -1351,7 +1351,7 @@
       BLOCK_COMMENT("Entry:");
     }
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -1425,7 +1425,7 @@
     __ cmp(rscratch1, count, Assembler::LSL, exact_log2(size));
     __ br(Assembler::HS, nooverlap_target);
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -1789,7 +1789,7 @@
     }
 #endif //ASSERT
 
-    DecoratorSet decorators = ARRAYCOPY_CHECKCAST;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_CHECKCAST;
     bool is_oop = true;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
--- a/src/hotspot/cpu/arm/stubGenerator_arm.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/arm/stubGenerator_arm.cpp	Fri May 18 15:21:23 2018 +0200
@@ -2945,7 +2945,7 @@
     __ push(LR);
 #endif // AARCH64
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (disjoint) {
       decorators |= ARRAYCOPY_DISJOINT;
     }
@@ -3217,7 +3217,7 @@
     pushed+=1;
 #endif // AARCH64
 
-    DecoratorSet decorators = ARRAYCOPY_CHECKCAST;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_CHECKCAST;
 
     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
     bs->arraycopy_prologue(_masm, decorators, true, to, count, callee_saved_regs);
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp	Fri May 18 15:21:23 2018 +0200
@@ -2024,7 +2024,7 @@
       STUB_ENTRY(arrayof_oop_disjoint_arraycopy) :
       STUB_ENTRY(oop_disjoint_arraycopy);
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2063,7 +2063,7 @@
     address start = __ function_entry();
     assert_positive_int(R5_ARG3);
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2159,7 +2159,7 @@
     }
 #endif
 
-    DecoratorSet decorators = ARRAYCOPY_CHECKCAST;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_CHECKCAST;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
--- a/src/hotspot/cpu/s390/stubGenerator_s390.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/s390/stubGenerator_s390.cpp	Fri May 18 15:21:23 2018 +0200
@@ -1300,7 +1300,7 @@
     unsigned int start_off = __ offset();  // Remember stub start address (is rtn value).
     unsigned int size      = UseCompressedOops ? 4 : 8;
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -1392,7 +1392,7 @@
     // Branch to disjoint_copy (if applicable) before pre_barrier to avoid double pre_barrier.
     array_overlap_test(nooverlap_target, shift);  // Branch away to nooverlap_target if disjoint.
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
--- a/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/sparc/stubGenerator_sparc.cpp	Fri May 18 15:21:23 2018 +0200
@@ -2269,7 +2269,7 @@
       BLOCK_COMMENT("Entry:");
     }
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2326,7 +2326,7 @@
 
     array_overlap_test(nooverlap_target, LogBytesPerHeapOop);
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2446,7 +2446,7 @@
       BLOCK_COMMENT("Entry:");
     }
 
-    DecoratorSet decorators = ARRAYCOPY_CHECKCAST;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_CHECKCAST;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
--- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp	Fri May 18 15:21:23 2018 +0200
@@ -837,7 +837,7 @@
       __ jcc(Assembler::zero, L_0_count);
     }
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -1026,7 +1026,7 @@
       __ jcc(Assembler::zero, L_0_count);
     }
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -1383,7 +1383,7 @@
     Address   to_element_addr(end_to,   count, Address::times_ptr, 0);
     Address elem_klass_addr(elem, oopDesc::klass_offset_in_bytes());
 
-    DecoratorSet decorators = ARRAYCOPY_CHECKCAST;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_CHECKCAST;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
--- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp	Fri May 18 15:21:23 2018 +0200
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp	Fri May 18 15:21:23 2018 +0200
@@ -1820,7 +1820,7 @@
     setup_arg_regs(); // from => rdi, to => rsi, count => rdx
                       // r9 and r10 may be used to save non-volatile registers
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -1914,7 +1914,7 @@
     setup_arg_regs(); // from => rdi, to => rsi, count => rdx
                       // r9 and r10 may be used to save non-volatile registers
 
-    DecoratorSet decorators = 0;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2018,7 +2018,7 @@
                       // r9 and r10 may be used to save non-volatile registers
     // 'from', 'to' and 'qword_count' are now valid
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2111,7 +2111,7 @@
                       // r9 and r10 may be used to save non-volatile registers
     // 'from', 'to' and 'qword_count' are now valid
 
-    DecoratorSet decorators = ARRAYCOPY_DISJOINT;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_DISJOINT;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }
@@ -2294,7 +2294,7 @@
     Address from_element_addr(end_from, count, TIMES_OOP, 0);
     Address   to_element_addr(end_to,   count, TIMES_OOP, 0);
 
-    DecoratorSet decorators = ARRAYCOPY_CHECKCAST;
+    DecoratorSet decorators = IN_HEAP | IN_HEAP_ARRAY | ARRAYCOPY_CHECKCAST;
     if (dest_uninitialized) {
       decorators |= AS_DEST_NOT_INITIALIZED;
     }