< prev index next >

src/cpu/aarch64/vm/aarch64.ad

Print this page
rev 10083 : 8149100: AArch64: "bad AD file" for LL enconding AryEq Node matching
Summary: add byte array equal support for aarch64
Reviewed-by: duke


14911 %}
14912 
14913 instruct string_equals(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
14914                         iRegI_R0 result, iRegP_R10 tmp, rFlagsReg cr)
14915 %{
14916   predicate(!CompactStrings);
14917   match(Set result (StrEquals (Binary str1 str2) cnt));
14918   effect(KILL tmp, USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
14919 
14920   format %{ "String Equals $str1,$str2,$cnt -> $result    // KILL $tmp" %}
14921   ins_encode %{
14922     // Count is in 8-bit bytes; non-Compact chars are 16 bits.
14923     __ asrw($cnt$$Register, $cnt$$Register, 1);
14924     __ string_equals($str1$$Register, $str2$$Register,
14925                       $cnt$$Register, $result$$Register,
14926                       $tmp$$Register);
14927   %}
14928   ins_pipe(pipe_class_memory);
14929 %}
14930 
14931 instruct array_equals(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,















14932                       iRegP_R10 tmp, rFlagsReg cr)
14933 %{
14934   predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::UU);
14935   match(Set result (AryEq ary1 ary2));
14936   effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, KILL cr);
14937 
14938   format %{ "Array Equals $ary1,ary2 -> $result    // KILL $tmp" %}
14939   ins_encode %{
14940     __ char_arrays_equals($ary1$$Register, $ary2$$Register,
14941                           $result$$Register, $tmp$$Register);
14942   %}
14943   ins_pipe(pipe_class_memory);
14944 %}
14945 
14946 // encode char[] to byte[] in ISO_8859_1
14947 instruct encode_iso_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
14948                           vRegD_V0 Vtmp1, vRegD_V1 Vtmp2,
14949                           vRegD_V2 Vtmp3, vRegD_V3 Vtmp4,
14950                           iRegI_R0 result, rFlagsReg cr)
14951 %{




14911 %}
14912 
14913 instruct string_equals(iRegP_R1 str1, iRegP_R3 str2, iRegI_R4 cnt,
14914                         iRegI_R0 result, iRegP_R10 tmp, rFlagsReg cr)
14915 %{
14916   predicate(!CompactStrings);
14917   match(Set result (StrEquals (Binary str1 str2) cnt));
14918   effect(KILL tmp, USE_KILL str1, USE_KILL str2, USE_KILL cnt, KILL cr);
14919 
14920   format %{ "String Equals $str1,$str2,$cnt -> $result    // KILL $tmp" %}
14921   ins_encode %{
14922     // Count is in 8-bit bytes; non-Compact chars are 16 bits.
14923     __ asrw($cnt$$Register, $cnt$$Register, 1);
14924     __ string_equals($str1$$Register, $str2$$Register,
14925                       $cnt$$Register, $result$$Register,
14926                       $tmp$$Register);
14927   %}
14928   ins_pipe(pipe_class_memory);
14929 %}
14930 
14931 instruct array_equalsB(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
14932                       iRegP_R10 tmp, rFlagsReg cr)
14933 %{
14934   predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::LL);
14935   match(Set result (AryEq ary1 ary2));
14936   effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, KILL cr);
14937 
14938   format %{ "Array Equals $ary1,ary2 -> $result    // KILL $tmp" %}
14939   ins_encode %{
14940     __ byte_arrays_equals($ary1$$Register, $ary2$$Register,
14941                           $result$$Register, $tmp$$Register);
14942   %}
14943   ins_pipe(pipe_class_memory);
14944 %}
14945 
14946 instruct array_equalsC(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
14947                       iRegP_R10 tmp, rFlagsReg cr)
14948 %{
14949   predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::UU);
14950   match(Set result (AryEq ary1 ary2));
14951   effect(KILL tmp, USE_KILL ary1, USE_KILL ary2, KILL cr);
14952 
14953   format %{ "Array Equals $ary1,ary2 -> $result    // KILL $tmp" %}
14954   ins_encode %{
14955     __ char_arrays_equals($ary1$$Register, $ary2$$Register,
14956                           $result$$Register, $tmp$$Register);
14957   %}
14958   ins_pipe(pipe_class_memory);
14959 %}
14960 
14961 // encode char[] to byte[] in ISO_8859_1
14962 instruct encode_iso_array(iRegP_R2 src, iRegP_R1 dst, iRegI_R3 len,
14963                           vRegD_V0 Vtmp1, vRegD_V1 Vtmp2,
14964                           vRegD_V2 Vtmp3, vRegD_V3 Vtmp4,
14965                           iRegI_R0 result, rFlagsReg cr)
14966 %{


< prev index next >