src/cpu/sparc/vm/stubGenerator_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6982370 Cdiff src/cpu/sparc/vm/stubGenerator_sparc.cpp

src/cpu/sparc/vm/stubGenerator_sparc.cpp

Print this page

        

*** 1607,1617 **** // O3 is used as a temp register assert_clean_int(count, O3); // Make sure 'count' is clean int. Label L_exit, L_skip_align1, L_skip_align2, L_fill_byte; ! Label L_fill_2_bytes, L_fill_4_bytes, L_fill_32_bytes; int shift = -1; switch (t) { case T_BYTE: shift = 2; --- 1607,1617 ---- // O3 is used as a temp register assert_clean_int(count, O3); // Make sure 'count' is clean int. Label L_exit, L_skip_align1, L_skip_align2, L_fill_byte; ! Label L_fill_2_bytes, L_fill_elements, L_fill_32_bytes; int shift = -1; switch (t) { case T_BYTE: shift = 2;
*** 1633,1653 **** __ sllx(value, 8, O3); __ or3(value, O3, value); } if (t == T_SHORT) { // Zero extend value ! __ sethi(0xffff0000, O3); ! __ andn(value, O3, value); } if (t == T_BYTE || t == T_SHORT) { __ sllx(value, 16, O3); __ or3(value, O3, value); } __ cmp(count, 2<<shift); // Short arrays (< 8 bytes) fill by element ! __ brx(Assembler::lessUnsigned, false, Assembler::pn, L_fill_4_bytes); // use unsigned cmp ! __ delayed()->andcc(count, 1<<shift, G0); if (!aligned && (t == T_BYTE || t == T_SHORT)) { // align source address at 4 bytes address boundary if (t == T_BYTE) { // One byte misalignment happens only for byte arrays --- 1633,1653 ---- __ sllx(value, 8, O3); __ or3(value, O3, value); } if (t == T_SHORT) { // Zero extend value ! __ sllx(value, 48, value); ! __ srlx(value, 48, value); } if (t == T_BYTE || t == T_SHORT) { __ sllx(value, 16, O3); __ or3(value, O3, value); } __ cmp(count, 2<<shift); // Short arrays (< 8 bytes) fill by element ! __ brx(Assembler::lessUnsigned, false, Assembler::pn, L_fill_elements); // use unsigned cmp ! __ delayed()->andcc(count, 1, G0); if (!aligned && (t == T_BYTE || t == T_SHORT)) { // align source address at 4 bytes address boundary if (t == T_BYTE) { // One byte misalignment happens only for byte arrays
*** 1696,1706 **** // Fill 32-byte chunks __ subcc(count, 8 << shift, count); __ brx(Assembler::less, false, Assembler::pt, L_check_fill_8_bytes); __ delayed()->nop(); ! Label L_fill_32_bytes_loop; __ align(16); __ BIND(L_fill_32_bytes_loop); __ stx(value, to, 0); __ stx(value, to, 8); --- 1696,1706 ---- // Fill 32-byte chunks __ subcc(count, 8 << shift, count); __ brx(Assembler::less, false, Assembler::pt, L_check_fill_8_bytes); __ delayed()->nop(); ! Label L_fill_32_bytes_loop, L_fill_4_bytes; __ align(16); __ BIND(L_fill_32_bytes_loop); __ stx(value, to, 0); __ stx(value, to, 8);
*** 1728,1737 **** --- 1728,1740 ---- __ brx(Assembler::greaterEqual, false, Assembler::pn, L_fill_8_bytes_loop); __ delayed()->add(to, 8, to); // fill trailing 4 bytes __ andcc(count, 1<<shift, G0); // in delay slot of branches + if (t == T_INT) { + __ BIND(L_fill_elements); + } __ BIND(L_fill_4_bytes); __ brx(Assembler::zero, false, Assembler::pt, L_fill_2_bytes); if (t == T_BYTE || t == T_SHORT) { __ delayed()->andcc(count, 1<<(shift-1), G0); } else {
*** 1760,1770 **** } else { __ BIND(L_fill_2_bytes); } __ BIND(L_exit); __ retl(); ! __ delayed()->mov(G0, O0); // return 0 return start; } // // Generate stub for conjoint short copy. If "aligned" is true, the --- 1763,1814 ---- } else { __ BIND(L_fill_2_bytes); } __ BIND(L_exit); __ retl(); ! __ delayed()->nop(); ! ! // Handle copies less than 8 bytes. Int is handled elsewhere. ! if (t == T_BYTE) { ! __ BIND(L_fill_elements); ! Label L_fill_2, L_fill_4; ! // in delay slot __ andcc(count, 1, G0); ! __ brx(Assembler::zero, false, Assembler::pt, L_fill_2); ! __ delayed()->andcc(count, 2, G0); ! __ stb(value, to, 0); ! __ inc(to, 1); ! __ BIND(L_fill_2); ! __ brx(Assembler::zero, false, Assembler::pt, L_fill_4); ! __ delayed()->andcc(count, 4, G0); ! __ stb(value, to, 0); ! __ stb(value, to, 1); ! __ inc(to, 2); ! __ BIND(L_fill_4); ! __ brx(Assembler::zero, false, Assembler::pt, L_exit); ! __ delayed()->nop(); ! __ stb(value, to, 0); ! __ stb(value, to, 1); ! __ stb(value, to, 2); ! __ retl(); ! __ delayed()->stb(value, to, 3); ! } ! ! if (t == T_SHORT) { ! Label L_fill_2; ! __ BIND(L_fill_elements); ! // in delay slot __ andcc(count, 1, G0); ! __ brx(Assembler::zero, false, Assembler::pt, L_fill_2); ! __ delayed()->andcc(count, 2, G0); ! __ sth(value, to, 0); ! __ inc(to, 2); ! __ BIND(L_fill_2); ! __ brx(Assembler::zero, false, Assembler::pt, L_exit); ! __ delayed()->nop(); ! __ sth(value, to, 0); ! __ retl(); ! __ delayed()->sth(value, to, 2); ! } return start; } // // Generate stub for conjoint short copy. If "aligned" is true, the
src/cpu/sparc/vm/stubGenerator_sparc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File