< prev index next >

src/cpu/sparc/vm/sparc.ad

Print this page




10154                     $result$$Register, true /* byte */);
10155   %}
10156   ins_pipe(long_memory_op);
10157 %}
10158 
10159 instruct array_equalsC(o0RegP ary1, o1RegP ary2, g3RegI tmp1, notemp_iRegI result,
10160                        o7RegI tmp2, flagsReg ccr) %{
10161   predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::UU);
10162   match(Set result (AryEq ary1 ary2));
10163   effect(USE_KILL ary1, USE_KILL ary2, KILL tmp1, KILL tmp2, KILL ccr);
10164   ins_cost(300);
10165   format %{ "Array Equals $ary1,$ary2 -> $result   // KILL $tmp1,$tmp2" %}
10166   ins_encode %{
10167     __ array_equals(true, $ary1$$Register, $ary2$$Register,
10168                     $tmp1$$Register, $tmp2$$Register,
10169                     $result$$Register, false /* byte */);
10170   %}
10171   ins_pipe(long_memory_op);
10172 %}
10173 


















10174 // char[] to byte[] compression
10175 instruct string_compress(o0RegP src, o1RegP dst, g3RegI len, notemp_iRegI result, iRegL tmp, flagsReg ccr) %{
10176   predicate(UseVIS < 3);
10177   match(Set result (StrCompressedCopy src (Binary dst len)));
10178   effect(TEMP result, TEMP tmp, USE_KILL src, USE_KILL dst, USE_KILL len, KILL ccr);
10179   ins_cost(300);
10180   format %{ "String Compress $src,$dst,$len -> $result    // KILL $tmp" %}
10181   ins_encode %{
10182     Label Ldone;
10183     __ signx($len$$Register);
10184     __ cmp_zero_and_br(Assembler::zero, $len$$Register, Ldone, false, Assembler::pn);
10185     __ delayed()->mov($len$$Register, $result$$Register); // copy count
10186     __ string_compress($src$$Register, $dst$$Register, $len$$Register, $result$$Register, $tmp$$Register, Ldone);
10187     __ bind(Ldone);
10188   %}
10189   ins_pipe(long_memory_op);
10190 %}
10191 
10192 // fast char[] to byte[] compression using VIS instructions
10193 instruct string_compress_fast(o0RegP src, o1RegP dst, g3RegI len, notemp_iRegI result,




10154                     $result$$Register, true /* byte */);
10155   %}
10156   ins_pipe(long_memory_op);
10157 %}
10158 
10159 instruct array_equalsC(o0RegP ary1, o1RegP ary2, g3RegI tmp1, notemp_iRegI result,
10160                        o7RegI tmp2, flagsReg ccr) %{
10161   predicate(((AryEqNode*)n)->encoding() == StrIntrinsicNode::UU);
10162   match(Set result (AryEq ary1 ary2));
10163   effect(USE_KILL ary1, USE_KILL ary2, KILL tmp1, KILL tmp2, KILL ccr);
10164   ins_cost(300);
10165   format %{ "Array Equals $ary1,$ary2 -> $result   // KILL $tmp1,$tmp2" %}
10166   ins_encode %{
10167     __ array_equals(true, $ary1$$Register, $ary2$$Register,
10168                     $tmp1$$Register, $tmp2$$Register,
10169                     $result$$Register, false /* byte */);
10170   %}
10171   ins_pipe(long_memory_op);
10172 %}
10173 
10174 instruct has_negatives(o0RegP pAryR, g3RegI iSizeR, notemp_iRegI resultR,
10175                        iRegL tmp1L, iRegL tmp2L, iRegL tmp3L, iRegL tmp4L,
10176                        iRegL tmp5L,
10177                        flagsReg ccr) 
10178 %{
10179   match(Set resultR (HasNegatives pAryR iSizeR));
10180   effect(TEMP resultR, TEMP tmp1L, TEMP tmp2L, TEMP tmp3L, TEMP tmp4L, TEMP tmp5L, USE pAryR, USE iSizeR, KILL ccr);
10181   format %{ "has negatives byte[] $pAryR,$iSizeR -> $resultR // KILL $tmp1L,$tmp2L,$tmp3L,$tmp4L,$tmp5L" %}
10182   ins_encode %{
10183     __ has_negatives($pAryR$$Register, $iSizeR$$Register, 
10184                      $resultR$$Register,
10185                      $tmp1L$$Register, $tmp2L$$Register, 
10186                      $tmp3L$$Register, $tmp4L$$Register, 
10187                      $tmp5L$$Register);
10188   %}
10189   ins_pipe(long_memory_op);
10190 %}
10191 
10192 // char[] to byte[] compression
10193 instruct string_compress(o0RegP src, o1RegP dst, g3RegI len, notemp_iRegI result, iRegL tmp, flagsReg ccr) %{
10194   predicate(UseVIS < 3);
10195   match(Set result (StrCompressedCopy src (Binary dst len)));
10196   effect(TEMP result, TEMP tmp, USE_KILL src, USE_KILL dst, USE_KILL len, KILL ccr);
10197   ins_cost(300);
10198   format %{ "String Compress $src,$dst,$len -> $result    // KILL $tmp" %}
10199   ins_encode %{
10200     Label Ldone;
10201     __ signx($len$$Register);
10202     __ cmp_zero_and_br(Assembler::zero, $len$$Register, Ldone, false, Assembler::pn);
10203     __ delayed()->mov($len$$Register, $result$$Register); // copy count
10204     __ string_compress($src$$Register, $dst$$Register, $len$$Register, $result$$Register, $tmp$$Register, Ldone);
10205     __ bind(Ldone);
10206   %}
10207   ins_pipe(long_memory_op);
10208 %}
10209 
10210 // fast char[] to byte[] compression using VIS instructions
10211 instruct string_compress_fast(o0RegP src, o1RegP dst, g3RegI len, notemp_iRegI result,


< prev index next >