< prev index next >

src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp

Print this page
8248238: Adding Windows support to OpenJDK on AArch64

Summary: Adding Windows support for AArch64

Contributed-by: Ludovic Henry <luhenry@microsoft.com>, Monica Beckwith <monica.beckwith@microsoft.com>
Reviewed-by:

*** 541,551 **** // Compare strings. void C2_MacroAssembler::string_compare(Register str1, Register str2, Register cnt1, Register cnt2, Register result, Register tmp1, Register tmp2, FloatRegister vtmp1, FloatRegister vtmp2, FloatRegister vtmp3, int ae) { Label DONE, SHORT_LOOP, SHORT_STRING, SHORT_LAST, TAIL, STUB, ! DIFFERENCE, NEXT_WORD, SHORT_LOOP_TAIL, SHORT_LAST2, SHORT_LAST_INIT, SHORT_LOOP_START, TAIL_CHECK; bool isLL = ae == StrIntrinsicNode::LL; bool isLU = ae == StrIntrinsicNode::LU; bool isUL = ae == StrIntrinsicNode::UL; --- 541,551 ---- // Compare strings. void C2_MacroAssembler::string_compare(Register str1, Register str2, Register cnt1, Register cnt2, Register result, Register tmp1, Register tmp2, FloatRegister vtmp1, FloatRegister vtmp2, FloatRegister vtmp3, int ae) { Label DONE, SHORT_LOOP, SHORT_STRING, SHORT_LAST, TAIL, STUB, ! DIFF, NEXT_WORD, SHORT_LOOP_TAIL, SHORT_LAST2, SHORT_LAST_INIT, SHORT_LOOP_START, TAIL_CHECK; bool isLL = ae == StrIntrinsicNode::LL; bool isLU = ae == StrIntrinsicNode::LU; bool isUL = ae == StrIntrinsicNode::UL;
*** 632,642 **** fmovd(tmp2, vtmp); } adds(cnt2, cnt2, isUL ? 4 : 8); br(GE, TAIL); eor(rscratch2, tmp1, tmp2); ! cbnz(rscratch2, DIFFERENCE); // main loop bind(NEXT_WORD); if (str1_isL == str2_isL) { ldr(tmp1, Address(str1, cnt2)); ldr(tmp2, Address(str2, cnt2)); --- 632,642 ---- fmovd(tmp2, vtmp); } adds(cnt2, cnt2, isUL ? 4 : 8); br(GE, TAIL); eor(rscratch2, tmp1, tmp2); ! cbnz(rscratch2, DIFF); // main loop bind(NEXT_WORD); if (str1_isL == str2_isL) { ldr(tmp1, Address(str1, cnt2)); ldr(tmp2, Address(str2, cnt2));
*** 658,671 **** } br(GE, TAIL); eor(rscratch2, tmp1, tmp2); cbz(rscratch2, NEXT_WORD); ! b(DIFFERENCE); bind(TAIL); eor(rscratch2, tmp1, tmp2); ! cbnz(rscratch2, DIFFERENCE); // Last longword. In the case where length == 4 we compare the // same longword twice, but that's still faster than another // conditional branch. if (str1_isL == str2_isL) { ldr(tmp1, Address(str1)); --- 658,671 ---- } br(GE, TAIL); eor(rscratch2, tmp1, tmp2); cbz(rscratch2, NEXT_WORD); ! b(DIFF); bind(TAIL); eor(rscratch2, tmp1, tmp2); ! cbnz(rscratch2, DIFF); // Last longword. In the case where length == 4 we compare the // same longword twice, but that's still faster than another // conditional branch. if (str1_isL == str2_isL) { ldr(tmp1, Address(str1));
*** 685,695 **** eor(rscratch2, tmp1, tmp2); cbz(rscratch2, DONE); // Find the first different characters in the longwords and // compute their difference. ! bind(DIFFERENCE); rev(rscratch2, rscratch2); clz(rscratch2, rscratch2); andr(rscratch2, rscratch2, isLL ? -8 : -16); lsrv(tmp1, tmp1, rscratch2); (this->*ext_chr)(tmp1, tmp1); --- 685,695 ---- eor(rscratch2, tmp1, tmp2); cbz(rscratch2, DONE); // Find the first different characters in the longwords and // compute their difference. ! bind(DIFF); rev(rscratch2, rscratch2); clz(rscratch2, rscratch2); andr(rscratch2, rscratch2, isLL ? -8 : -16); lsrv(tmp1, tmp1, rscratch2); (this->*ext_chr)(tmp1, tmp1);
< prev index next >