--- old/src/hotspot/cpu/aarch64/aarch64.ad 2018-04-20 22:35:24.973507849 +0300 +++ new/src/hotspot/cpu/aarch64/aarch64.ad 2018-04-20 22:35:24.765511092 +0300 @@ -15980,12 +15980,13 @@ %} instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, + iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, - TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr); + TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr); format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU)" %} ins_encode %{ @@ -15993,18 +15994,20 @@ $cnt1$$Register, $cnt2$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register, $tmp4$$Register, + $tmp5$$Register, $tmp6$$Register, -1, $result$$Register, StrIntrinsicNode::UU); %} ins_pipe(pipe_class_memory); %} instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, + iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, - TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr); + TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr); format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL)" %} ins_encode %{ @@ -16012,18 +16015,20 @@ $cnt1$$Register, $cnt2$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register, $tmp4$$Register, + $tmp5$$Register, $tmp6$$Register, -1, $result$$Register, StrIntrinsicNode::LL); %} ins_pipe(pipe_class_memory); %} instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) + iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, + iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr) %{ predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL); match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, - TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr); + TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr); format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL)" %} ins_encode %{ @@ -16031,30 +16036,12 @@ $cnt1$$Register, $cnt2$$Register, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register, $tmp4$$Register, + $tmp5$$Register, $tmp6$$Register, -1, $result$$Register, StrIntrinsicNode::UL); %} ins_pipe(pipe_class_memory); %} -instruct string_indexofLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2, - iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) -%{ - predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LU); - match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2))); - effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, - TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr); - format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LU)" %} - - ins_encode %{ - __ string_indexof($str1$$Register, $str2$$Register, - $cnt1$$Register, $cnt2$$Register, - $tmp1$$Register, $tmp2$$Register, - $tmp3$$Register, $tmp4$$Register, - -1, $result$$Register, StrIntrinsicNode::LU); - %} - ins_pipe(pipe_class_memory); -%} - instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) @@ -16070,7 +16057,7 @@ __ string_indexof($str1$$Register, $str2$$Register, $cnt1$$Register, zr, $tmp1$$Register, $tmp2$$Register, - $tmp3$$Register, $tmp4$$Register, + $tmp3$$Register, $tmp4$$Register, zr, zr, icnt2, $result$$Register, StrIntrinsicNode::UU); %} ins_pipe(pipe_class_memory); @@ -16091,7 +16078,7 @@ __ string_indexof($str1$$Register, $str2$$Register, $cnt1$$Register, zr, $tmp1$$Register, $tmp2$$Register, - $tmp3$$Register, $tmp4$$Register, + $tmp3$$Register, $tmp4$$Register, zr, zr, icnt2, $result$$Register, StrIntrinsicNode::LL); %} ins_pipe(pipe_class_memory); @@ -16112,32 +16099,11 @@ __ string_indexof($str1$$Register, $str2$$Register, $cnt1$$Register, zr, $tmp1$$Register, $tmp2$$Register, - $tmp3$$Register, $tmp4$$Register, + $tmp3$$Register, $tmp4$$Register, zr, zr, icnt2, $result$$Register, StrIntrinsicNode::UL); %} ins_pipe(pipe_class_memory); %} - -instruct string_indexof_conLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, - immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, - iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr) -%{ - predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LU); - match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2))); - effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, - TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr); - format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LU)" %} - - ins_encode %{ - int icnt2 = (int)$int_cnt2$$constant; - __ string_indexof($str1$$Register, $str2$$Register, - $cnt1$$Register, zr, - $tmp1$$Register, $tmp2$$Register, - $tmp3$$Register, $tmp4$$Register, - icnt2, $result$$Register, StrIntrinsicNode::LU); - %} - ins_pipe(pipe_class_memory); -%} instruct string_indexofU_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,