Skip to content

Commit 33d9a85

Browse files
author
Ningsheng Jian
committed
8307572: AArch64: Vector registers are clobbered by some macroassemblers
Reviewed-by: aph, adinn
1 parent 9a7b443 commit 33d9a85

File tree

6 files changed

+391
-57
lines changed

6 files changed

+391
-57
lines changed

src/hotspot/cpu/aarch64/aarch64.ad

+75-50
Original file line numberDiff line numberDiff line change
@@ -17105,14 +17105,17 @@ instruct string_compareUU_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI
1710517105
%}
1710617106

1710717107
instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
17108-
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
17109-
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
17108+
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
17109+
iRegINoSp tmp3, iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6,
17110+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, rFlagsReg cr)
1711017111
%{
1711117112
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
1711217113
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
1711317114
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
17114-
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
17115-
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU)" %}
17115+
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6,
17116+
TEMP vtmp0, TEMP vtmp1, KILL cr);
17117+
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU) "
17118+
"# KILL $str1 $cnt1 $str2 $cnt2 $tmp1 $tmp2 $tmp3 $tmp4 $tmp5 $tmp6 V0-V1 cr" %}
1711617119

1711717120
ins_encode %{
1711817121
__ string_indexof($str1$$Register, $str2$$Register,
@@ -17126,14 +17129,17 @@ instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2
1712617129
%}
1712717130

1712817131
instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
17129-
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
17130-
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
17132+
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
17133+
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6,
17134+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, rFlagsReg cr)
1713117135
%{
1713217136
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
1713317137
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
1713417138
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
17135-
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
17136-
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL)" %}
17139+
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6,
17140+
TEMP vtmp0, TEMP vtmp1, KILL cr);
17141+
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL) "
17142+
"# KILL $str1 $cnt1 $str2 $cnt2 $tmp1 $tmp2 $tmp3 $tmp4 $tmp5 $tmp6 V0-V1 cr" %}
1713717143

1713817144
ins_encode %{
1713917145
__ string_indexof($str1$$Register, $str2$$Register,
@@ -17147,14 +17153,17 @@ instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2
1714717153
%}
1714817154

1714917155
instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
17150-
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
17151-
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
17156+
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,iRegINoSp tmp3,
17157+
iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6,
17158+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, rFlagsReg cr)
1715217159
%{
1715317160
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
1715417161
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
1715517162
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
17156-
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
17157-
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL)" %}
17163+
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5,
17164+
TEMP tmp6, TEMP vtmp0, TEMP vtmp1, KILL cr);
17165+
format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL) "
17166+
"# KILL $str1 cnt1 $str2 $cnt2 $tmp1 $tmp2 $tmp3 $tmp4 $tmp5 $tmp6 V0-V1 cr" %}
1715817167

1715917168
ins_encode %{
1716017169
__ string_indexof($str1$$Register, $str2$$Register,
@@ -17168,14 +17177,15 @@ instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2
1716817177
%}
1716917178

1717017179
instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
17171-
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
17172-
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
17180+
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
17181+
iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
1717317182
%{
1717417183
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
1717517184
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
1717617185
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
1717717186
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
17178-
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UU)" %}
17187+
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UU) "
17188+
"# KILL $str1 $cnt1 $str2 $tmp1 $tmp2 $tmp3 $tmp4 cr" %}
1717917189

1718017190
ins_encode %{
1718117191
int icnt2 = (int)$int_cnt2$$constant;
@@ -17189,14 +17199,15 @@ instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
1718917199
%}
1719017200

1719117201
instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
17192-
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
17193-
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
17202+
immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
17203+
iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
1719417204
%{
1719517205
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
1719617206
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
1719717207
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
1719817208
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
17199-
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LL)" %}
17209+
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LL) "
17210+
"# KILL $str1 $cnt1 $str2 $tmp1 $tmp2 $tmp3 $tmp4 cr" %}
1720017211

1720117212
ins_encode %{
1720217213
int icnt2 = (int)$int_cnt2$$constant;
@@ -17210,14 +17221,15 @@ instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
1721017221
%}
1721117222

1721217223
instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
17213-
immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
17214-
iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
17224+
immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1,
17225+
iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
1721517226
%{
1721617227
predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
1721717228
match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
1721817229
effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
1721917230
TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
17220-
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UL)" %}
17231+
format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UL) "
17232+
"# KILL $str1 $cnt1 $str2 $tmp1 $tmp2 $tmp3 $tmp4 cr" %}
1722117233

1722217234
ins_encode %{
1722317235
int icnt2 = (int)$int_cnt2$$constant;
@@ -17334,13 +17346,17 @@ instruct string_equalsU(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
1733417346

1733517347
instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
1733617348
iRegP_R3 tmp1, iRegP_R4 tmp2, iRegP_R5 tmp3,
17349+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
17350+
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, vRegD_V7 vtmp7,
1733717351
iRegP_R10 tmp, rFlagsReg cr)
1733817352
%{
1733917353
predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::LL);
1734017354
match(Set result (AryEq ary1 ary2));
17341-
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
17355+
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3,
17356+
TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5,
17357+
TEMP vtmp6, TEMP vtmp7, KILL cr);
1734217358

17343-
format %{ "Array Equals $ary1,ary2 -> $result // KILL $tmp" %}
17359+
format %{ "Array Equals $ary1,ary2 -> $result # KILL $ary1 $ary2 $tmp $tmp1 $tmp2 $tmp3 V0-V7 cr" %}
1734417360
ins_encode %{
1734517361
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
1734617362
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
@@ -17355,13 +17371,17 @@ instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
1735517371

1735617372
instruct array_equalsC(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
1735717373
iRegP_R3 tmp1, iRegP_R4 tmp2, iRegP_R5 tmp3,
17374+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
17375+
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, vRegD_V7 vtmp7,
1735817376
iRegP_R10 tmp, rFlagsReg cr)
1735917377
%{
1736017378
predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::UU);
1736117379
match(Set result (AryEq ary1 ary2));
17362-
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
17380+
effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, TEMP tmp1, TEMP tmp2, TEMP tmp3,
17381+
TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5,
17382+
TEMP vtmp6, TEMP vtmp7, KILL cr);
1736317383

17364-
format %{ "Array Equals $ary1,ary2 -> $result // KILL $tmp" %}
17384+
format %{ "Array Equals $ary1,ary2 -> $result # KILL $ary1 $ary2 $tmp $tmp1 $tmp2 $tmp3 V0-V7 cr" %}
1736517385
ins_encode %{
1736617386
address tpc = __ arrays_equals($ary1$$Register, $ary2$$Register,
1736717387
$tmp1$$Register, $tmp2$$Register, $tmp3$$Register,
@@ -17391,36 +17411,39 @@ instruct count_positives(iRegP_R1 ary1, iRegI_R2 len, iRegI_R0 result, rFlagsReg
1739117411

1739217412
// fast char[] to byte[] compression
1739317413
instruct string_compress(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
17394-
vRegD_V0 tmp1, vRegD_V1 tmp2,
17395-
vRegD_V2 tmp3, vRegD_V3 tmp4,
17414+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2,
17415+
vRegD_V3 vtmp3, vRegD_V4 vtmp4, vRegD_V5 vtmp5,
1739617416
iRegI_R0 result, rFlagsReg cr)
1739717417
%{
1739817418
match(Set result (StrCompressedCopy src (Binary dst len)));
17399-
effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4,
17419+
effect(TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5,
1740017420
USE_KILL src, USE_KILL dst, USE len, KILL cr);
1740117421

17402-
format %{ "String Compress $src,$dst,$len -> $result // KILL $src,$dst" %}
17422+
format %{ "String Compress $src,$dst,$len -> $result # KILL $src $dst V0-V5 cr" %}
1740317423
ins_encode %{
1740417424
__ char_array_compress($src$$Register, $dst$$Register, $len$$Register,
17405-
$result$$Register,
17406-
$tmp1$$FloatRegister, $tmp2$$FloatRegister,
17407-
$tmp3$$FloatRegister, $tmp4$$FloatRegister);
17425+
$result$$Register, $vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
17426+
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister,
17427+
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister);
1740817428
%}
1740917429
ins_pipe(pipe_slow);
1741017430
%}
1741117431

1741217432
// fast byte[] to char[] inflation
17413-
instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len,
17414-
vRegD_V0 tmp1, vRegD_V1 tmp2, vRegD_V2 tmp3, iRegP_R3 tmp4, rFlagsReg cr)
17433+
instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len, iRegP_R3 tmp,
17434+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
17435+
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, rFlagsReg cr)
1741517436
%{
1741617437
match(Set dummy (StrInflatedCopy src (Binary dst len)));
17417-
effect(TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, USE_KILL src, USE_KILL dst, USE_KILL len, KILL cr);
17438+
effect(TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3,
17439+
TEMP vtmp4, TEMP vtmp5, TEMP vtmp6, TEMP tmp,
17440+
USE_KILL src, USE_KILL dst, USE_KILL len, KILL cr);
1741817441

17419-
format %{ "String Inflate $src,$dst // KILL $tmp1, $tmp2" %}
17442+
format %{ "String Inflate $src,$dst # KILL $tmp $src $dst $len V0-V6 cr" %}
1742017443
ins_encode %{
1742117444
address tpc = __ byte_array_inflate($src$$Register, $dst$$Register, $len$$Register,
17422-
$tmp1$$FloatRegister, $tmp2$$FloatRegister,
17423-
$tmp3$$FloatRegister, $tmp4$$Register);
17445+
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
17446+
$vtmp2$$FloatRegister, $tmp$$Register);
1742417447
if (tpc == NULL) {
1742517448
ciEnv::current()->record_failure("CodeCache is full");
1742617449
return;
@@ -17431,41 +17454,43 @@ instruct string_inflate(Universe dummy, iRegP_R0 src, iRegP_R1 dst, iRegI_R2 len
1743117454

1743217455
// encode char[] to byte[] in ISO_8859_1
1743317456
instruct encode_iso_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
17434-
vRegD_V0 vtmp0, vRegD_V1 vtmp1,
17435-
vRegD_V2 vtmp2, vRegD_V3 vtmp3,
17457+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2,
17458+
vRegD_V3 vtmp3, vRegD_V4 vtmp4, vRegD_V5 vtmp5,
1743617459
iRegI_R0 result, rFlagsReg cr)
1743717460
%{
1743817461
predicate(!((EncodeISOArrayNode*)n)->is_ascii());
1743917462
match(Set result (EncodeISOArray src (Binary dst len)));
17440-
effect(USE_KILL src, USE_KILL dst, USE len,
17441-
KILL vtmp0, KILL vtmp1, KILL vtmp2, KILL vtmp3, KILL cr);
17463+
effect(USE_KILL src, USE_KILL dst, USE len, KILL vtmp0, KILL vtmp1,
17464+
KILL vtmp2, KILL vtmp3, KILL vtmp4, KILL vtmp5, KILL cr);
1744217465

17443-
format %{ "Encode ISO array $src,$dst,$len -> $result" %}
17466+
format %{ "Encode ISO array $src,$dst,$len -> $result # KILL $src $dst V0-V5 cr" %}
1744417467
ins_encode %{
1744517468
__ encode_iso_array($src$$Register, $dst$$Register, $len$$Register,
1744617469
$result$$Register, false,
1744717470
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
17448-
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister);
17471+
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister,
17472+
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister);
1744917473
%}
1745017474
ins_pipe(pipe_class_memory);
1745117475
%}
1745217476

1745317477
instruct encode_ascii_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
17454-
vRegD_V0 vtmp0, vRegD_V1 vtmp1,
17455-
vRegD_V2 vtmp2, vRegD_V3 vtmp3,
17478+
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2,
17479+
vRegD_V3 vtmp3, vRegD_V4 vtmp4, vRegD_V5 vtmp5,
1745617480
iRegI_R0 result, rFlagsReg cr)
1745717481
%{
1745817482
predicate(((EncodeISOArrayNode*)n)->is_ascii());
1745917483
match(Set result (EncodeISOArray src (Binary dst len)));
17460-
effect(USE_KILL src, USE_KILL dst, USE len,
17461-
KILL vtmp0, KILL vtmp1, KILL vtmp2, KILL vtmp3, KILL cr);
17484+
effect(USE_KILL src, USE_KILL dst, USE len, KILL vtmp0, KILL vtmp1,
17485+
KILL vtmp2, KILL vtmp3, KILL vtmp4, KILL vtmp5, KILL cr);
1746217486

17463-
format %{ "Encode ASCII array $src,$dst,$len -> $result" %}
17487+
format %{ "Encode ASCII array $src,$dst,$len -> $result # KILL $src $dst V0-V5 cr" %}
1746417488
ins_encode %{
1746517489
__ encode_iso_array($src$$Register, $dst$$Register, $len$$Register,
1746617490
$result$$Register, true,
1746717491
$vtmp0$$FloatRegister, $vtmp1$$FloatRegister,
17468-
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister);
17492+
$vtmp2$$FloatRegister, $vtmp3$$FloatRegister,
17493+
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister);
1746917494
%}
1747017495
ins_pipe(pipe_class_memory);
1747117496
%}

src/hotspot/cpu/aarch64/c2_MacroAssembler_aarch64.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
typedef void (MacroAssembler::* chr_insn)(Register Rt, const Address &adr);
4747

4848
// Search for str1 in str2 and return index or -1
49+
// Clobbers: rscratch1, rscratch2, rflags. May also clobber v0-v1, when icnt1==-1.
4950
void C2_MacroAssembler::string_indexof(Register str2, Register str1,
5051
Register cnt2, Register cnt1,
5152
Register tmp1, Register tmp2,

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

+11-5
Original file line numberDiff line numberDiff line change
@@ -5008,6 +5008,8 @@ address MacroAssembler::count_positives(Register ary1, Register len, Register re
50085008
return pc();
50095009
}
50105010

5011+
// Clobbers: rscratch1, rscratch2, rflags
5012+
// May also clobber v0-v7 when (!UseSimpleArrayEquals && UseSIMDForArrayEquals)
50115013
address MacroAssembler::arrays_equals(Register a1, Register a2, Register tmp3,
50125014
Register tmp4, Register tmp5, Register result,
50135015
Register cnt1, int elem_size) {
@@ -5557,10 +5559,12 @@ void MacroAssembler::fill_words(Register base, Register cnt, Register value)
55575559
// Using 'umaxv' in the ASCII-case comes with a small penalty but does
55585560
// avoid additional bloat.
55595561
//
5562+
// Clobbers: src, dst, res, rscratch1, rscratch2, rflags
55605563
void MacroAssembler::encode_iso_array(Register src, Register dst,
55615564
Register len, Register res, bool ascii,
55625565
FloatRegister vtmp0, FloatRegister vtmp1,
5563-
FloatRegister vtmp2, FloatRegister vtmp3)
5566+
FloatRegister vtmp2, FloatRegister vtmp3,
5567+
FloatRegister vtmp4, FloatRegister vtmp5)
55645568
{
55655569
Register cnt = res;
55665570
Register max = rscratch1;
@@ -5579,8 +5583,8 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
55795583
br(LT, DONE_32);
55805584
ld1(vtmp0, vtmp1, vtmp2, vtmp3, T8H, Address(post(src, 64)));
55815585
// Extract lower bytes.
5582-
FloatRegister vlo0 = v4;
5583-
FloatRegister vlo1 = v5;
5586+
FloatRegister vlo0 = vtmp4;
5587+
FloatRegister vlo1 = vtmp5;
55845588
uzp1(vlo0, T16B, vtmp0, vtmp1);
55855589
uzp1(vlo1, T16B, vtmp2, vtmp3);
55865590
// Merge bits...
@@ -5653,6 +5657,7 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
56535657
}
56545658

56555659
// Inflate byte[] array to char[].
5660+
// Clobbers: src, dst, len, rflags, rscratch1, v0-v6
56565661
address MacroAssembler::byte_array_inflate(Register src, Register dst, Register len,
56575662
FloatRegister vtmp1, FloatRegister vtmp2,
56585663
FloatRegister vtmp3, Register tmp4) {
@@ -5761,8 +5766,9 @@ address MacroAssembler::byte_array_inflate(Register src, Register dst, Register
57615766
void MacroAssembler::char_array_compress(Register src, Register dst, Register len,
57625767
Register res,
57635768
FloatRegister tmp0, FloatRegister tmp1,
5764-
FloatRegister tmp2, FloatRegister tmp3) {
5765-
encode_iso_array(src, dst, len, res, false, tmp0, tmp1, tmp2, tmp3);
5769+
FloatRegister tmp2, FloatRegister tmp3,
5770+
FloatRegister tmp4, FloatRegister tmp5) {
5771+
encode_iso_array(src, dst, len, res, false, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5);
57665772
// Adjust result: res == len ? len : 0
57675773
cmp(len, res);
57685774
csel(res, res, zr, EQ);

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1393,12 +1393,14 @@ class MacroAssembler: public Assembler {
13931393
void char_array_compress(Register src, Register dst, Register len,
13941394
Register res,
13951395
FloatRegister vtmp0, FloatRegister vtmp1,
1396-
FloatRegister vtmp2, FloatRegister vtmp3);
1396+
FloatRegister vtmp2, FloatRegister vtmp3,
1397+
FloatRegister vtmp4, FloatRegister vtmp5);
13971398

13981399
void encode_iso_array(Register src, Register dst,
13991400
Register len, Register res, bool ascii,
14001401
FloatRegister vtmp0, FloatRegister vtmp1,
1401-
FloatRegister vtmp2, FloatRegister vtmp3);
1402+
FloatRegister vtmp2, FloatRegister vtmp3,
1403+
FloatRegister vtmp4, FloatRegister vtmp5);
14021404

14031405
void fast_log(FloatRegister vtmp0, FloatRegister vtmp1, FloatRegister vtmp2,
14041406
FloatRegister vtmp3, FloatRegister vtmp4, FloatRegister vtmp5,

0 commit comments

Comments
 (0)