8223244: Fix usage of ARRAYCOPY_DISJOINT decorator

Reviewed-by: eosterlund, shade
This commit is contained in:
Roman Kennke 2019-05-08 11:59:14 +02:00
parent 94d1d0d3d4
commit 40fddae1dc
4 changed files with 37 additions and 29 deletions

View File

@ -1788,7 +1788,7 @@ class StubGenerator: public StubCodeGenerator {
}
#endif //ASSERT
DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_CHECKCAST;
DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_CHECKCAST | ARRAYCOPY_DISJOINT;
bool is_oop = true;
if (dest_uninitialized) {
decorators |= IS_DEST_UNINITIALIZED;

View File

@ -36,12 +36,14 @@ void ModRefBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Decorat
if (type == T_OBJECT || type == T_ARRAY) {
#ifdef _LP64
if (!checkcast && !obj_int) {
// Save count for barrier
__ movptr(r11, count);
} else if (disjoint && obj_int) {
// Save dst in r11 in the disjoint case
__ movq(r11, dst);
if (!checkcast) {
if (!obj_int) {
// Save count for barrier
__ movptr(r11, count);
} else if (disjoint) {
// Save dst in r11 in the disjoint case
__ movq(r11, dst);
}
}
#else
if (disjoint) {
@ -61,13 +63,15 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
if (type == T_OBJECT || type == T_ARRAY) {
#ifdef _LP64
if (!checkcast && !obj_int) {
// Save count for barrier
count = r11;
} else if (disjoint && obj_int) {
// Use the saved dst in the disjoint case
dst = r11;
} else if (checkcast) {
if (!checkcast) {
if (!obj_int) {
// Save count for barrier
count = r11;
} else if (disjoint) {
// Use the saved dst in the disjoint case
dst = r11;
}
} else {
tmp = rscratch1;
}
#else

View File

@ -53,12 +53,14 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec
if (type == T_OBJECT || type == T_ARRAY) {
#ifdef _LP64
if (!checkcast && !obj_int) {
// Save count for barrier
__ movptr(r11, count);
} else if (disjoint && obj_int) {
// Save dst in r11 in the disjoint case
__ movq(r11, dst);
if (!checkcast) {
if (!obj_int) {
// Save count for barrier
__ movptr(r11, count);
} else if (disjoint) {
// Save dst in r11 in the disjoint case
__ movq(r11, dst);
}
}
#else
if (disjoint) {
@ -123,13 +125,15 @@ void ShenandoahBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Dec
if (type == T_OBJECT || type == T_ARRAY) {
#ifdef _LP64
if (!checkcast && !obj_int) {
// Save count for barrier
count = r11;
} else if (disjoint && obj_int) {
// Use the saved dst in the disjoint case
dst = r11;
} else if (checkcast) {
if (!checkcast) {
if (!obj_int) {
// Save count for barrier
count = r11;
} else if (disjoint && obj_int) {
// Use the saved dst in the disjoint case
dst = r11;
}
} else {
tmp = rscratch1;
}
#else

View File

@ -2183,7 +2183,7 @@ class StubGenerator: public StubCodeGenerator {
// r9 is used to save r15_thread
// 'from', 'to' and 'qword_count' are now valid
DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_DISJOINT;
DecoratorSet decorators = IN_HEAP | IS_ARRAY;
if (dest_uninitialized) {
decorators |= IS_DEST_UNINITIALIZED;
}
@ -2377,7 +2377,7 @@ class StubGenerator: public StubCodeGenerator {
Address from_element_addr(end_from, count, TIMES_OOP, 0);
Address to_element_addr(end_to, count, TIMES_OOP, 0);
DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_CHECKCAST;
DecoratorSet decorators = IN_HEAP | IS_ARRAY | ARRAYCOPY_CHECKCAST | ARRAYCOPY_DISJOINT;
if (dest_uninitialized) {
decorators |= IS_DEST_UNINITIALIZED;
}