< prev index next >

src/hotspot/cpu/aarch64/aarch64.ad

Print this page




15963 %}
15964 
15965 instruct string_compareLU(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI_R4 cnt2,
15966                         iRegI_R0 result, vRegD vtmp1, vRegD vtmp2, iRegP_R10 tmp1, rFlagsReg cr)
15967 %{
15968   predicate(((StrCompNode*)n)->encoding() == StrIntrinsicNode::LU);
15969   match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
15970   effect(KILL tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, TEMP vtmp1, TEMP vtmp2, KILL cr);
15971 
15972   format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result   # KILL $tmp1" %}
15973   ins_encode %{
15974     __ string_compare($str1$$Register, $str2$$Register,
15975                       $cnt1$$Register, $cnt2$$Register, $result$$Register,
15976                       $tmp1$$Register,
15977                       $vtmp1$$FloatRegister, $vtmp2$$FloatRegister, StrIntrinsicNode::LU);
15978   %}
15979   ins_pipe(pipe_class_memory);
15980 %}
15981 
15982 instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
15983        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)

15984 %{
15985   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
15986   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
15987   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
15988          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
15989   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU)" %}
15990 
15991   ins_encode %{
15992     __ string_indexof($str1$$Register, $str2$$Register,
15993                       $cnt1$$Register, $cnt2$$Register,
15994                       $tmp1$$Register, $tmp2$$Register,
15995                       $tmp3$$Register, $tmp4$$Register,

15996                       -1, $result$$Register, StrIntrinsicNode::UU);
15997   %}
15998   ins_pipe(pipe_class_memory);
15999 %}
16000 
16001 instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
16002        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)

16003 %{
16004   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
16005   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
16006   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
16007          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16008   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL)" %}
16009 
16010   ins_encode %{
16011     __ string_indexof($str1$$Register, $str2$$Register,
16012                       $cnt1$$Register, $cnt2$$Register,
16013                       $tmp1$$Register, $tmp2$$Register,
16014                       $tmp3$$Register, $tmp4$$Register,

16015                       -1, $result$$Register, StrIntrinsicNode::LL);
16016   %}
16017   ins_pipe(pipe_class_memory);
16018 %}
16019 
16020 instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
16021        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)

16022 %{
16023   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
16024   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
16025   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
16026          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16027   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL)" %}
16028 
16029   ins_encode %{
16030     __ string_indexof($str1$$Register, $str2$$Register,
16031                       $cnt1$$Register, $cnt2$$Register,
16032                       $tmp1$$Register, $tmp2$$Register,
16033                       $tmp3$$Register, $tmp4$$Register,

16034                       -1, $result$$Register, StrIntrinsicNode::UL);
16035   %}
16036   ins_pipe(pipe_class_memory);
16037 %}
16038 
16039 instruct string_indexofLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
16040        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16041 %{
16042   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LU);
16043   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
16044   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
16045          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16046   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LU)" %}
16047 
16048   ins_encode %{
16049     __ string_indexof($str1$$Register, $str2$$Register,
16050                       $cnt1$$Register, $cnt2$$Register,
16051                       $tmp1$$Register, $tmp2$$Register,
16052                       $tmp3$$Register, $tmp4$$Register,
16053                       -1, $result$$Register, StrIntrinsicNode::LU);
16054   %}
16055   ins_pipe(pipe_class_memory);
16056 %}
16057 
16058 instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16059                  immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16060                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16061 %{
16062   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
16063   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16064   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16065          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16066   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UU)" %}
16067 
16068   ins_encode %{
16069     int icnt2 = (int)$int_cnt2$$constant;
16070     __ string_indexof($str1$$Register, $str2$$Register,
16071                       $cnt1$$Register, zr,
16072                       $tmp1$$Register, $tmp2$$Register,
16073                       $tmp3$$Register, $tmp4$$Register,
16074                       icnt2, $result$$Register, StrIntrinsicNode::UU);
16075   %}
16076   ins_pipe(pipe_class_memory);
16077 %}
16078 
16079 instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16080                  immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16081                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16082 %{
16083   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
16084   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16085   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16086          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16087   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LL)" %}
16088 
16089   ins_encode %{
16090     int icnt2 = (int)$int_cnt2$$constant;
16091     __ string_indexof($str1$$Register, $str2$$Register,
16092                       $cnt1$$Register, zr,
16093                       $tmp1$$Register, $tmp2$$Register,
16094                       $tmp3$$Register, $tmp4$$Register,
16095                       icnt2, $result$$Register, StrIntrinsicNode::LL);
16096   %}
16097   ins_pipe(pipe_class_memory);
16098 %}
16099 
16100 instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16101                  immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16102                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16103 %{
16104   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
16105   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16106   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16107          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16108   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UL)" %}
16109 
16110   ins_encode %{
16111     int icnt2 = (int)$int_cnt2$$constant;
16112     __ string_indexof($str1$$Register, $str2$$Register,
16113                       $cnt1$$Register, zr,
16114                       $tmp1$$Register, $tmp2$$Register,
16115                       $tmp3$$Register, $tmp4$$Register,
16116                       icnt2, $result$$Register, StrIntrinsicNode::UL);
16117   %}
16118   ins_pipe(pipe_class_memory);
16119 %}
16120 
16121 instruct string_indexof_conLU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16122                  immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16123                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16124 %{
16125   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LU);
16126   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16127   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16128          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16129   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LU)" %}
16130 
16131   ins_encode %{
16132     int icnt2 = (int)$int_cnt2$$constant;
16133     __ string_indexof($str1$$Register, $str2$$Register,
16134                       $cnt1$$Register, zr,
16135                       $tmp1$$Register, $tmp2$$Register,
16136                       $tmp3$$Register, $tmp4$$Register,
16137                       icnt2, $result$$Register, StrIntrinsicNode::LU);
16138   %}
16139   ins_pipe(pipe_class_memory);
16140 %}
16141 
16142 instruct string_indexofU_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
16143                               iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16144                               iRegINoSp tmp3, rFlagsReg cr)
16145 %{
16146   match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
16147   effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch,
16148          TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
16149 
16150   format %{ "String IndexOf char[] $str1,$cnt1,$ch -> $result" %}
16151 
16152   ins_encode %{
16153     __ string_indexof_char($str1$$Register, $cnt1$$Register, $ch$$Register,
16154                            $result$$Register, $tmp1$$Register, $tmp2$$Register,
16155                            $tmp3$$Register);
16156   %}
16157   ins_pipe(pipe_class_memory);




15963 %}
15964 
15965 instruct string_compareLU(iRegP_R1 str1, iRegI_R2 cnt1, iRegP_R3 str2, iRegI_R4 cnt2,
15966                         iRegI_R0 result, vRegD vtmp1, vRegD vtmp2, iRegP_R10 tmp1, rFlagsReg cr)
15967 %{
15968   predicate(((StrCompNode*)n)->encoding() == StrIntrinsicNode::LU);
15969   match(Set result (StrComp (Binary str1 cnt1) (Binary str2 cnt2)));
15970   effect(KILL tmp1, USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2, TEMP vtmp1, TEMP vtmp2, KILL cr);
15971 
15972   format %{ "String Compare $str1,$cnt1,$str2,$cnt2 -> $result   # KILL $tmp1" %}
15973   ins_encode %{
15974     __ string_compare($str1$$Register, $str2$$Register,
15975                       $cnt1$$Register, $cnt2$$Register, $result$$Register,
15976                       $tmp1$$Register,
15977                       $vtmp1$$FloatRegister, $vtmp2$$FloatRegister, StrIntrinsicNode::LU);
15978   %}
15979   ins_pipe(pipe_class_memory);
15980 %}
15981 
15982 instruct string_indexofUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
15983        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
15984        iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
15985 %{
15986   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
15987   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
15988   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
15989          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
15990   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UU)" %}
15991 
15992   ins_encode %{
15993     __ string_indexof($str1$$Register, $str2$$Register,
15994                       $cnt1$$Register, $cnt2$$Register,
15995                       $tmp1$$Register, $tmp2$$Register,
15996                       $tmp3$$Register, $tmp4$$Register,
15997                       $tmp5$$Register, $tmp6$$Register,
15998                       -1, $result$$Register, StrIntrinsicNode::UU);
15999   %}
16000   ins_pipe(pipe_class_memory);
16001 %}
16002 
16003 instruct string_indexofLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
16004        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
16005        iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
16006 %{
16007   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
16008   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
16009   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
16010          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
16011   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (LL)" %}
16012 
16013   ins_encode %{
16014     __ string_indexof($str1$$Register, $str2$$Register,
16015                       $cnt1$$Register, $cnt2$$Register,
16016                       $tmp1$$Register, $tmp2$$Register,
16017                       $tmp3$$Register, $tmp4$$Register,
16018                       $tmp5$$Register, $tmp6$$Register,
16019                       -1, $result$$Register, StrIntrinsicNode::LL);
16020   %}
16021   ins_pipe(pipe_class_memory);
16022 %}
16023 
16024 instruct string_indexofUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2, iRegI_R2 cnt2,
16025        iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2, iRegINoSp tmp3,
16026        iRegINoSp tmp4, iRegINoSp tmp5, iRegINoSp tmp6, rFlagsReg cr)
16027 %{
16028   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
16029   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 cnt2)));
16030   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1, USE_KILL cnt2,
16031          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, TEMP tmp5, TEMP tmp6, KILL cr);
16032   format %{ "String IndexOf $str1,$cnt1,$str2,$cnt2 -> $result (UL)" %}
16033 
16034   ins_encode %{
16035     __ string_indexof($str1$$Register, $str2$$Register,
16036                       $cnt1$$Register, $cnt2$$Register,
16037                       $tmp1$$Register, $tmp2$$Register,
16038                       $tmp3$$Register, $tmp4$$Register,
16039                       $tmp5$$Register, $tmp6$$Register,
16040                       -1, $result$$Register, StrIntrinsicNode::UL);
16041   %}
16042   ins_pipe(pipe_class_memory);
16043 %}
16044 



















16045 instruct string_indexof_conUU(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16046                  immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16047                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16048 %{
16049   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UU);
16050   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16051   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16052          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16053   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UU)" %}
16054 
16055   ins_encode %{
16056     int icnt2 = (int)$int_cnt2$$constant;
16057     __ string_indexof($str1$$Register, $str2$$Register,
16058                       $cnt1$$Register, zr,
16059                       $tmp1$$Register, $tmp2$$Register,
16060                       $tmp3$$Register, $tmp4$$Register, zr, zr,
16061                       icnt2, $result$$Register, StrIntrinsicNode::UU);
16062   %}
16063   ins_pipe(pipe_class_memory);
16064 %}
16065 
16066 instruct string_indexof_conLL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16067                  immI_le_4 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16068                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16069 %{
16070   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::LL);
16071   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16072   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16073          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16074   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (LL)" %}
16075 
16076   ins_encode %{
16077     int icnt2 = (int)$int_cnt2$$constant;
16078     __ string_indexof($str1$$Register, $str2$$Register,
16079                       $cnt1$$Register, zr,
16080                       $tmp1$$Register, $tmp2$$Register,
16081                       $tmp3$$Register, $tmp4$$Register, zr, zr,
16082                       icnt2, $result$$Register, StrIntrinsicNode::LL);
16083   %}
16084   ins_pipe(pipe_class_memory);
16085 %}
16086 
16087 instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
16088                  immI_1 int_cnt2, iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16089                  iRegINoSp tmp3, iRegINoSp tmp4, rFlagsReg cr)
16090 %{
16091   predicate(((StrIndexOfNode*)n)->encoding() == StrIntrinsicNode::UL);
16092   match(Set result (StrIndexOf (Binary str1 cnt1) (Binary str2 int_cnt2)));
16093   effect(USE_KILL str1, USE_KILL str2, USE_KILL cnt1,
16094          TEMP tmp1, TEMP tmp2, TEMP tmp3, TEMP tmp4, KILL cr);
16095   format %{ "String IndexOf $str1,$cnt1,$str2,$int_cnt2 -> $result (UL)" %}
16096 
16097   ins_encode %{
16098     int icnt2 = (int)$int_cnt2$$constant;
16099     __ string_indexof($str1$$Register, $str2$$Register,
16100                       $cnt1$$Register, zr,
16101                       $tmp1$$Register, $tmp2$$Register,
16102                       $tmp3$$Register, $tmp4$$Register, zr, zr,
16103                       icnt2, $result$$Register, StrIntrinsicNode::UL);





















16104   %}
16105   ins_pipe(pipe_class_memory);
16106 %}
16107 
16108 instruct string_indexofU_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
16109                               iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
16110                               iRegINoSp tmp3, rFlagsReg cr)
16111 %{
16112   match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
16113   effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch,
16114          TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
16115 
16116   format %{ "String IndexOf char[] $str1,$cnt1,$ch -> $result" %}
16117 
16118   ins_encode %{
16119     __ string_indexof_char($str1$$Register, $cnt1$$Register, $ch$$Register,
16120                            $result$$Register, $tmp1$$Register, $tmp2$$Register,
16121                            $tmp3$$Register);
16122   %}
16123   ins_pipe(pipe_class_memory);


< prev index next >