src/cpu/x86/vm/stubGenerator_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Thu Feb 24 12:43:02 2011
--- new/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Thu Feb 24 12:43:02 2011

*** 921,931 **** --- 921,932 ---- __ emms(); } address generate_disjoint_copy(BasicType t, bool aligned, Address::ScaleFactor sf, ! address* entry, const char *name) { ! address* entry, const char *name, + bool need_pre_barrier = true) { __ align(CodeEntryAlignment); StubCodeMark mark(this, "StubRoutines", name); address start = __ pc(); Label L_0_count, L_exit, L_skip_align1, L_skip_align2, L_copy_byte;
*** 952,962 **** --- 953,965 ---- } if (t == T_OBJECT) { __ testl(count, count); __ jcc(Assembler::zero, L_0_count); + if (need_pre_barrier) { gen_write_ref_array_pre_barrier(to, count); + } __ mov(saved_to, to); // save 'to' } __ subptr(to, from); // to --> to_from __ cmpl(count, 2<<shift); // Short arrays (< 8 bytes) copy by element
*** 1086,1096 **** --- 1089,1100 ---- } address generate_conjoint_copy(BasicType t, bool aligned, Address::ScaleFactor sf, address nooverlap_target, ! address* entry, const char *name) { ! address* entry, const char *name, + bool need_pre_barrier = true) { __ align(CodeEntryAlignment); StubCodeMark mark(this, "StubRoutines", name); address start = __ pc(); Label L_0_count, L_exit, L_skip_align1, L_skip_align2, L_copy_byte;
*** 1130,1141 **** --- 1134,1147 ---- __ jump_cc(Assembler::aboveEqual, nooverlap); if (t == T_OBJECT) { __ testl(count, count); __ jcc(Assembler::zero, L_0_count); + if (need_pre_barrier) { gen_write_ref_array_pre_barrier(dst, count); } + } // copy from high to low __ cmpl(count, 2<<shift); // Short arrays (< 8 bytes) copy by element __ jcc(Assembler::below, L_copy_4_bytes); // use unsigned cmp if (t == T_BYTE || t == T_SHORT) {
*** 1417,1427 **** --- 1423,1433 ---- // // Output: // rax, == 0 - success // rax, == -1^K - failure, where K is partial transfer count // ! address generate_checkcast_copy(const char *name, address* entry, bool need_pre_barrier = true) { __ align(CodeEntryAlignment); StubCodeMark mark(this, "StubRoutines", name); address start = __ pc(); Label L_load_element, L_store_element, L_do_card_marks, L_done;
*** 1478,1488 **** --- 1484,1496 ---- Address from_element_addr(end_from, count, Address::times_ptr, 0); Address to_element_addr(end_to, count, Address::times_ptr, 0); Address elem_klass_addr(elem, oopDesc::klass_offset_in_bytes()); // Copy from low to high addresses, indexed from the end of each array. + if (need_pre_barrier) { gen_write_ref_array_pre_barrier(to, count); + } __ lea(end_from, end_from_addr); __ lea(end_to, end_to_addr); assert(length == count, ""); // else fix next line: __ negptr(count); // negate and test the length __ jccb(Assembler::notZero, L_load_element);
*** 2041,2050 **** --- 2049,2065 ---- "oop_disjoint_arraycopy"); StubRoutines::_oop_arraycopy = generate_conjoint_copy(T_OBJECT, true, Address::times_ptr, entry, &entry_oop_arraycopy, "oop_arraycopy"); + StubRoutines::_oop_disjoint_arraycopy_no_pre = + generate_disjoint_copy(T_OBJECT, true, Address::times_ptr, &entry, + "oop_disjoint_arraycopy_no_pre", false); + StubRoutines::_oop_arraycopy_no_pre = + generate_conjoint_copy(T_OBJECT, true, Address::times_ptr, entry, + NULL, "oop_arraycopy_no_pre", false); + StubRoutines::_jlong_disjoint_arraycopy = generate_disjoint_long_copy(&entry, "jlong_disjoint_arraycopy"); StubRoutines::_jlong_arraycopy = generate_conjoint_long_copy(entry, &entry_jlong_arraycopy, "jlong_arraycopy");
*** 2054,2077 **** --- 2069,2092 ---- StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill"); StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill"); StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill"); StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill"); ! StubRoutines::_arrayof_jint_disjoint_arraycopy = StubRoutines::_jint_disjoint_arraycopy; ! StubRoutines::_jint_disjoint_arraycopy; ! StubRoutines::_arrayof_oop_disjoint_arraycopy = ! StubRoutines::_oop_disjoint_arraycopy; StubRoutines::_arrayof_jlong_disjoint_arraycopy = StubRoutines::_jlong_disjoint_arraycopy; ! StubRoutines::_arrayof_oop_disjoint_arraycopy = StubRoutines::_oop_disjoint_arraycopy; ! StubRoutines::_arrayof_oop_disjoint_arraycopy_no_pre = StubRoutines::_oop_disjoint_arraycopy_no_pre; ! StubRoutines::_arrayof_jlong_disjoint_arraycopy = StubRoutines::_jlong_disjoint_arraycopy; StubRoutines::_arrayof_jint_arraycopy = StubRoutines::_jint_arraycopy; StubRoutines::_arrayof_oop_arraycopy = StubRoutines::_oop_arraycopy; + StubRoutines::_arrayof_oop_arraycopy_no_pre = StubRoutines::_oop_arraycopy_no_pre; StubRoutines::_arrayof_jlong_arraycopy = StubRoutines::_jlong_arraycopy; StubRoutines::_checkcast_arraycopy = ! generate_checkcast_copy("checkcast_arraycopy", &entry_checkcast_arraycopy); &entry_checkcast_arraycopy); + StubRoutines::_checkcast_arraycopy_no_pre = + generate_checkcast_copy("checkcast_arraycopy_no_pre", NULL, false); StubRoutines::_unsafe_arraycopy = generate_unsafe_copy("unsafe_arraycopy", entry_jbyte_arraycopy, entry_jshort_arraycopy,

src/cpu/x86/vm/stubGenerator_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File