src/share/vm/code/relocInfo.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/code/relocInfo.cpp

src/share/vm/code/relocInfo.cpp

Print this page

        

*** 28,37 **** --- 28,38 ---- #include "code/nmethod.hpp" #include "code/relocInfo.hpp" #include "memory/resourceArea.hpp" #include "runtime/stubCodeGenerator.hpp" #include "utilities/copy.hpp" + #include "oops/oop.inline.hpp" PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC const RelocationHolder RelocationHolder::none; // its type is relocInfo::none
*** 422,431 **** --- 423,456 ---- void Relocation::set_value(address x) { ShouldNotReachHere(); } + void Relocation::const_set_data_value(address x) { + #ifdef _LP64 + if (format() == relocInfo::narrow_oop_in_const) { + *(narrowOop*)addr() = oopDesc::encode_heap_oop((oop) x); + } else { + #endif + *(address*)addr() = x; + #ifdef _LP64 + } + #endif + } + + void Relocation::const_verify_data_value(address x) { + #ifdef _LP64 + if (format() == relocInfo::narrow_oop_in_const) { + assert(*(narrowOop*)addr() == oopDesc::encode_heap_oop((oop) x), "must agree"); + } else { + #endif + assert(*(address*)addr() == x, "must agree"); + #ifdef _LP64 + } + #endif + } + RelocationHolder Relocation::spec_simple(relocInfo::relocType rtype) { if (rtype == relocInfo::none) return RelocationHolder::none; relocInfo ri = relocInfo(rtype, 0); RelocIterator itr;
*** 578,588 **** dest->set_locs_end((relocInfo*) p); } void static_stub_Relocation::unpack_data() { address base = binding()->section_start(CodeBuffer::SECT_INSTS); ! _static_call = address_from_scaled_offset(unpack_1_int(), base); } void trampoline_stub_Relocation::pack_data_to(CodeSection* dest ) { short* p = (short*) dest->locs_end(); CodeSection* insts = dest->outer()->insts(); --- 603,614 ---- dest->set_locs_end((relocInfo*) p); } void static_stub_Relocation::unpack_data() { address base = binding()->section_start(CodeBuffer::SECT_INSTS); ! jint offset = unpack_1_int(); ! _static_call = address_from_scaled_offset(offset, base); } void trampoline_stub_Relocation::pack_data_to(CodeSection* dest ) { short* p = (short*) dest->locs_end(); CodeSection* insts = dest->outer()->insts();
*** 792,802 **** // search for the static stub who points back to this static call address static_call_addr = addr(); RelocIterator iter(code()); while (iter.next()) { if (iter.type() == relocInfo::static_stub_type) { ! if (iter.static_stub_reloc()->static_call() == static_call_addr) { return iter.addr(); } } } return NULL; --- 818,829 ---- // search for the static stub who points back to this static call address static_call_addr = addr(); RelocIterator iter(code()); while (iter.next()) { if (iter.type() == relocInfo::static_stub_type) { ! static_stub_Relocation* stub_reloc = iter.static_stub_reloc(); ! if (stub_reloc->static_call() == static_call_addr) { return iter.addr(); } } } return NULL;
*** 814,824 **** // search for the static stub who points back to this static call address static_call_addr = addr(); RelocIterator iter(code()); while (iter.next()) { if (iter.type() == relocInfo::static_stub_type) { ! if (iter.static_stub_reloc()->static_call() == static_call_addr) { return iter.addr(); } } } return NULL; --- 841,852 ---- // search for the static stub who points back to this static call address static_call_addr = addr(); RelocIterator iter(code()); while (iter.next()) { if (iter.type() == relocInfo::static_stub_type) { ! static_stub_Relocation* stub_reloc = iter.static_stub_reloc(); ! if (stub_reloc->static_call() == static_call_addr) { return iter.addr(); } } } return NULL;
src/share/vm/code/relocInfo.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File