@@ -1100,17 +1100,15 @@ int MachCallStaticJavaNode::ret_addr_offset() {
1100
1100
int MachCallDynamicJavaNode::ret_addr_offset() {
1101
1101
// Offset is 4 with postalloc expanded calls (bl is one instruction). We use
1102
1102
// postalloc expanded calls if we use inline caches and do not update method data.
1103
- if (UseInlineCaches)
1104
- return 4;
1103
+ if (UseInlineCaches) return 4;
1105
1104
1106
1105
int vtable_index = this->_vtable_index;
1107
1106
if (vtable_index < 0) {
1108
1107
// Must be invalid_vtable_index, not nonvirtual_vtable_index.
1109
1108
assert(vtable_index == Method::invalid_vtable_index, "correct sentinel value");
1110
1109
return 12;
1111
1110
} else {
1112
- assert(!UseInlineCaches, "expect vtable calls only if not using ICs");
1113
- return 24;
1111
+ return 24 + MacroAssembler::instr_size_for_decode_klass_not_null();
1114
1112
}
1115
1113
}
1116
1114
@@ -3635,7 +3633,7 @@ encode %{
3635
3633
int start_offset = __ offset();
3636
3634
3637
3635
Register Rtoc = (ra_) ? $constanttablebase : R2_TOC;
3638
- #if 0
3636
+
3639
3637
int vtable_index = this->_vtable_index;
3640
3638
if (_vtable_index < 0) {
3641
3639
// Must be invalid_vtable_index, not nonvirtual_vtable_index.
@@ -3656,7 +3654,7 @@ encode %{
3656
3654
__ relocate(virtual_call_Relocation::spec(virtual_call_meta_addr));
3657
3655
emit_call_with_trampoline_stub(_masm, (address)$meth$$method, relocInfo::none);
3658
3656
assert(((MachCallDynamicJavaNode*)this)->ret_addr_offset() == __ offset() - start_offset,
3659
- "Fix constant in ret_addr_offset()" );
3657
+ "Fix constant in ret_addr_offset(), expected %d", __ offset() - start_offset );
3660
3658
} else {
3661
3659
assert(!UseInlineCaches, "expect vtable calls only if not using ICs");
3662
3660
// Go thru the vtable. Get receiver klass. Receiver already
@@ -3676,14 +3674,9 @@ encode %{
3676
3674
// Call target. Either compiled code or C2I adapter.
3677
3675
__ mtctr(R11_scratch1);
3678
3676
__ bctrl();
3679
- if (((MachCallDynamicJavaNode*)this)->ret_addr_offset() != __ offset() - start_offset) {
3680
- tty->print(" %d, %d\n", ((MachCallDynamicJavaNode*)this)->ret_addr_offset(),__ offset() - start_offset);
3681
- }
3682
3677
assert(((MachCallDynamicJavaNode*)this)->ret_addr_offset() == __ offset() - start_offset,
3683
- "Fix constant in ret_addr_offset()" );
3678
+ "Fix constant in ret_addr_offset(), expected %d", __ offset() - start_offset );
3684
3679
}
3685
- #endif
3686
- Unimplemented(); // ret_addr_offset not yet fixed. Depends on compressed oops (load klass!).
3687
3680
%}
3688
3681
3689
3682
// a runtime call
0 commit comments