SUGGESTED FIX
c1_LIRAssembler_sparc.cpp.
*** 2358,2378 ****
--- 2358,2389 ----
if (md == NULL) {
bailout("out of memory building methodDataOop");
return;
}
ciProfileData* data = md->bci_to_data(bci);
assert(data != NULL, "need data for checkcast");
assert(data->is_BitData(), "need BitData for checkcast");
Register mdo = k_RInfo;
Register data_val = Rtmp1;
jobject2reg(md->encoding(), mdo);
Address data_addr(mdo, 0, md->byte_offset_of_slot(data, ProfileData::header_offset()));
+
+ int mdo_offset_bias = 0;
+ if (!Assembler::is_simm13(md->byte_offset_of_slot(data, ProfileData::header_offset()) + data->size_in_bytes())) {
+ // The offset is large so bias the mdo by the base of the slot so
+ // that the ld can use simm13s to reference the slots of the data
+ mdo_offset_bias = md->byte_offset_of_slot(data, ProfileData::header_offset());
+ __ set(mdo_offset_bias, data_val);
+ __ add(mdo, data_val, mdo);
+ }
+
+
+ Address data_addr(mdo, 0, md->byte_offset_of_slot(data, ProfileData::header_offset()) - mdo_offset_bias);
__ ld_ptr(data_addr, data_val);
__ set(BitData::null_flag_constant(), mdo);
__ or3(data_val, mdo, data_val);
jobject2reg(md->encoding(), mdo);
__ st_ptr(data_val, data_addr);
__ bind(profile_done);
}
Label done;
// patching may screw with our temporaries on sparc,
c1_GraphBuilder.cpp
*** 3156,3182 ****
--- 3156,3186 ----
default : return false; // do not inline
}
// create intrinsic node
const bool has_receiver = !callee->is_static();
ValueType* result_type = as_ValueType(callee->return_type());
Values* args = state()->pop_arguments(callee->arg_size());
ValueStack* locks = lock_stack();
if (profile_calls()) {
+ // Don't profile in the special case where the root method
+ // is the intrinsic
+ if (callee != method()) {
Value recv = NULL;
if (has_receiver) {
recv = args->at(0);
null_check(recv);
}
profile_call(recv, NULL);
}
+ }
Intrinsic* result = new Intrinsic(result_type, id, args, has_receiver, lock_stack(),
preserves_state, cantrap);
// append instruction & push result
Value value = append_split(result);
if (result_type != voidType) push(result_type, value);
#ifndef PRODUCT
// printing
if (PrintInlining) {
|