< prev index next >

src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp

Print this page

1023       (!UseFastNewObjectArray && is_reference_type(op->type())) ||
1024       (!UseFastNewTypeArray   && !is_reference_type(op->type()))) {
1025     __ j(*op->stub()->entry());
1026   } else {
1027     Register tmp1 = op->tmp1()->as_register();
1028     Register tmp2 = op->tmp2()->as_register();
1029     Register tmp3 = op->tmp3()->as_register();
1030     if (len == tmp1) {
1031       tmp1 = tmp3;
1032     } else if (len == tmp2) {
1033       tmp2 = tmp3;
1034     } else if (len == tmp3) {
1035       // everything is ok
1036     } else {
1037       __ mv(tmp3, len);
1038     }
1039     __ allocate_array(op->obj()->as_register(),
1040                       len,
1041                       tmp1,
1042                       tmp2,
1043                       arrayOopDesc::header_size(op->type()),
1044                       array_element_size(op->type()),
1045                       op->klass()->as_register(),
1046                       *op->stub()->entry());
1047   }
1048   __ bind(*op->stub()->continuation());
1049 }
1050 
1051 void LIR_Assembler::type_profile_helper(Register mdo, ciMethodData *md, ciProfileData *data,
1052                                         Register recv, Label* update_done) {
1053   for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
1054     Label next_test;
1055     // See if the receiver is receiver[n].
1056     __ ld(t1, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
1057     __ bne(recv, t1, next_test);
1058     Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)));
1059     __ increment(data_addr, DataLayout::counter_increment);
1060     __ j(*update_done);
1061     __ bind(next_test);
1062   }
1063 

1023       (!UseFastNewObjectArray && is_reference_type(op->type())) ||
1024       (!UseFastNewTypeArray   && !is_reference_type(op->type()))) {
1025     __ j(*op->stub()->entry());
1026   } else {
1027     Register tmp1 = op->tmp1()->as_register();
1028     Register tmp2 = op->tmp2()->as_register();
1029     Register tmp3 = op->tmp3()->as_register();
1030     if (len == tmp1) {
1031       tmp1 = tmp3;
1032     } else if (len == tmp2) {
1033       tmp2 = tmp3;
1034     } else if (len == tmp3) {
1035       // everything is ok
1036     } else {
1037       __ mv(tmp3, len);
1038     }
1039     __ allocate_array(op->obj()->as_register(),
1040                       len,
1041                       tmp1,
1042                       tmp2,
1043                       arrayOopDesc::base_offset_in_bytes(op->type()),
1044                       array_element_size(op->type()),
1045                       op->klass()->as_register(),
1046                       *op->stub()->entry());
1047   }
1048   __ bind(*op->stub()->continuation());
1049 }
1050 
1051 void LIR_Assembler::type_profile_helper(Register mdo, ciMethodData *md, ciProfileData *data,
1052                                         Register recv, Label* update_done) {
1053   for (uint i = 0; i < ReceiverTypeData::row_limit(); i++) {
1054     Label next_test;
1055     // See if the receiver is receiver[n].
1056     __ ld(t1, Address(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i))));
1057     __ bne(recv, t1, next_test);
1058     Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)));
1059     __ increment(data_addr, DataLayout::counter_increment);
1060     __ j(*update_done);
1061     __ bind(next_test);
1062   }
1063 
< prev index next >