3610 arrays_hashcode_elvload(vtmp[idx], Address(ary1, index, Address::times(elsize), 8 * idx * elsize), eltype);
3611 }
3612 // vresult = vresult * vnext + ary1[index+8*idx:index+8*idx+7];
3613 for (int idx = 0; idx < 4; idx++) {
3614 vpmulld(vresult[idx], vresult[idx], vnext, Assembler::AVX_256bit);
3615 arrays_hashcode_elvcast(vtmp[idx], eltype);
3616 vpaddd(vresult[idx], vresult[idx], vtmp[idx], Assembler::AVX_256bit);
3617 }
3618 // index += 32;
3619 addl(index, 32);
3620 // index < bound;
3621 cmpl(index, bound);
3622 jcc(Assembler::less, UNROLLED_VECTOR_LOOP_BEGIN);
3623 // }
3624
3625 lea(ary1, Address(ary1, bound, Address::times(elsize)));
3626 subl(cnt1, bound);
3627 // release bound
3628
3629 // vresult *= IntVector.fromArray(I256, power_of_31_backwards, 1);
3630 for (int idx = 0; idx < 4; idx++) {
3631 lea(tmp2, ExternalAddress(StubRoutines::x86::arrays_hashcode_powers_of_31() + ((8 * idx + 1) * sizeof(jint))));
3632 arrays_hashcode_elvload(vcoef[idx], Address(tmp2, 0), T_INT);
3633 vpmulld(vresult[idx], vresult[idx], vcoef[idx], Assembler::AVX_256bit);
3634 }
3635 // result += vresult.reduceLanes(ADD);
3636 for (int idx = 0; idx < 4; idx++) {
3637 reduceI(Op_AddReductionVI, 256/(sizeof(jint) * 8), result, result, vresult[idx], vtmp[(idx * 2 + 0) % 4], vtmp[(idx * 2 + 1) % 4]);
3638 }
3639
3640 // } else if (cnt1 < 32) {
3641
3642 bind(SHORT_UNROLLED_BEGIN);
3643 // int i = 1;
3644 movl(index, 1);
3645 cmpl(index, cnt1);
3646 jcc(Assembler::greaterEqual, SHORT_UNROLLED_LOOP_EXIT);
3647
3648 // for (; i < cnt1 ; i += 2) {
3649 bind(SHORT_UNROLLED_LOOP_BEGIN);
3650 movl(tmp3, 961);
3651 imull(result, tmp3);
3652 arrays_hashcode_elload(tmp2, Address(ary1, index, Address::times(elsize), -elsize), eltype);
|
3610 arrays_hashcode_elvload(vtmp[idx], Address(ary1, index, Address::times(elsize), 8 * idx * elsize), eltype);
3611 }
3612 // vresult = vresult * vnext + ary1[index+8*idx:index+8*idx+7];
3613 for (int idx = 0; idx < 4; idx++) {
3614 vpmulld(vresult[idx], vresult[idx], vnext, Assembler::AVX_256bit);
3615 arrays_hashcode_elvcast(vtmp[idx], eltype);
3616 vpaddd(vresult[idx], vresult[idx], vtmp[idx], Assembler::AVX_256bit);
3617 }
3618 // index += 32;
3619 addl(index, 32);
3620 // index < bound;
3621 cmpl(index, bound);
3622 jcc(Assembler::less, UNROLLED_VECTOR_LOOP_BEGIN);
3623 // }
3624
3625 lea(ary1, Address(ary1, bound, Address::times(elsize)));
3626 subl(cnt1, bound);
3627 // release bound
3628
3629 // vresult *= IntVector.fromArray(I256, power_of_31_backwards, 1);
3630 lea(tmp2, ExternalAddress(StubRoutines::x86::arrays_hashcode_powers_of_31() + (0 * sizeof(jint))));
3631 for (int idx = 0; idx < 4; idx++) {
3632 arrays_hashcode_elvload(vcoef[idx], Address(tmp2, (int)((8 * idx + 1) * sizeof(jint))), T_INT);
3633 vpmulld(vresult[idx], vresult[idx], vcoef[idx], Assembler::AVX_256bit);
3634 }
3635 // result += vresult.reduceLanes(ADD);
3636 for (int idx = 0; idx < 4; idx++) {
3637 reduceI(Op_AddReductionVI, 256/(sizeof(jint) * 8), result, result, vresult[idx], vtmp[(idx * 2 + 0) % 4], vtmp[(idx * 2 + 1) % 4]);
3638 }
3639
3640 // } else if (cnt1 < 32) {
3641
3642 bind(SHORT_UNROLLED_BEGIN);
3643 // int i = 1;
3644 movl(index, 1);
3645 cmpl(index, cnt1);
3646 jcc(Assembler::greaterEqual, SHORT_UNROLLED_LOOP_EXIT);
3647
3648 // for (; i < cnt1 ; i += 2) {
3649 bind(SHORT_UNROLLED_LOOP_BEGIN);
3650 movl(tmp3, 961);
3651 imull(result, tmp3);
3652 arrays_hashcode_elload(tmp2, Address(ary1, index, Address::times(elsize), -elsize), eltype);
|