src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp
changeset 49470 a273b521a559
parent 49455 848864ed9b17
child 49480 d7df2dd501ce
equal deleted inserted replaced
49469:1708db7f94c6 49470:a273b521a559
  1877     __ mov(src_pos, O1);
  1877     __ mov(src_pos, O1);
  1878     __ mov(dst,     O2);
  1878     __ mov(dst,     O2);
  1879     __ mov(dst_pos, O3);
  1879     __ mov(dst_pos, O3);
  1880     __ mov(length,  O4);
  1880     __ mov(length,  O4);
  1881     address copyfunc_addr = StubRoutines::generic_arraycopy();
  1881     address copyfunc_addr = StubRoutines::generic_arraycopy();
  1882 
  1882     assert(copyfunc_addr != NULL, "generic arraycopy stub required");
  1883     if (copyfunc_addr == NULL) { // Use C version if stub was not generated
  1883 
  1884       __ call_VM_leaf(tmp, CAST_FROM_FN_PTR(address, Runtime1::arraycopy));
       
  1885     } else {
       
  1886 #ifndef PRODUCT
  1884 #ifndef PRODUCT
  1887       if (PrintC1Statistics) {
  1885     if (PrintC1Statistics) {
  1888         address counter = (address)&Runtime1::_generic_arraycopystub_cnt;
  1886       address counter = (address)&Runtime1::_generic_arraycopystub_cnt;
  1889         __ inc_counter(counter, G1, G3);
  1887       __ inc_counter(counter, G1, G3);
  1890       }
  1888     }
  1891 #endif
  1889 #endif
  1892       __ call_VM_leaf(tmp, copyfunc_addr);
  1890     __ call_VM_leaf(tmp, copyfunc_addr);
  1893     }
  1891 
  1894 
  1892     __ xor3(O0, -1, tmp);
  1895     if (copyfunc_addr != NULL) {
  1893     __ sub(length, tmp, length);
  1896       __ xor3(O0, -1, tmp);
  1894     __ add(src_pos, tmp, src_pos);
  1897       __ sub(length, tmp, length);
  1895     __ cmp_zero_and_br(Assembler::less, O0, *stub->entry());
  1898       __ add(src_pos, tmp, src_pos);
  1896     __ delayed()->add(dst_pos, tmp, dst_pos);
  1899       __ cmp_zero_and_br(Assembler::less, O0, *stub->entry());
       
  1900       __ delayed()->add(dst_pos, tmp, dst_pos);
       
  1901     } else {
       
  1902       __ cmp_zero_and_br(Assembler::less, O0, *stub->entry());
       
  1903       __ delayed()->nop();
       
  1904     }
       
  1905     __ bind(*stub->continuation());
  1897     __ bind(*stub->continuation());
  1906     return;
  1898     return;
  1907   }
  1899   }
  1908 
  1900 
  1909   assert(default_type != NULL && default_type->is_array_klass(), "must be true at this point");
  1901   assert(default_type != NULL && default_type->is_array_klass(), "must be true at this point");