@@ -1952,16 +1952,15 @@ void C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register res
1952
1952
mv (pow31_3, 29791 ); // [31^^3]
1953
1953
mv (pow31_2, 961 ); // [31^^2]
1954
1954
1955
- slli (chunks_end, chunks, chunks_end_shift);
1956
- add (chunks_end, ary, chunks_end);
1955
+ shadd (chunks_end, chunks, ary, t0, chunks_end_shift);
1957
1956
andi (cnt, cnt, stride - 1 ); // don't forget about tail!
1958
1957
1959
1958
bind (WIDE_LOOP);
1960
- mulw (result, result, pow31_4); // 31^^4 * h
1961
1959
arrays_hashcode_elload (t0, Address (ary, 0 * elsize), eltype);
1962
1960
arrays_hashcode_elload (t1, Address (ary, 1 * elsize), eltype);
1963
1961
arrays_hashcode_elload (tmp5, Address (ary, 2 * elsize), eltype);
1964
1962
arrays_hashcode_elload (tmp6, Address (ary, 3 * elsize), eltype);
1963
+ mulw (result, result, pow31_4); // 31^^4 * h
1965
1964
mulw (t0, t0, pow31_3); // 31^^3 * ary[i+0]
1966
1965
addw (result, result, t0);
1967
1966
mulw (t1, t1, pow31_2); // 31^^2 * ary[i+1]
@@ -1976,8 +1975,7 @@ void C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register res
1976
1975
beqz (cnt, DONE);
1977
1976
1978
1977
bind (TAIL);
1979
- slli (chunks_end, cnt, chunks_end_shift);
1980
- add (chunks_end, ary, chunks_end);
1978
+ shadd (chunks_end, cnt, ary, t0, chunks_end_shift);
1981
1979
1982
1980
bind (TAIL_LOOP);
1983
1981
arrays_hashcode_elload (t0, Address (ary), eltype);
0 commit comments