This commit is contained in:
Dean Long 2015-10-17 19:40:30 -04:00
commit 344a9becee
539 changed files with 51665 additions and 1091 deletions

View file

@ -30,6 +30,7 @@
#include "memory/resourceArea.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "utilities/copy.hpp"
#include "oops/oop.inline.hpp"
const RelocationHolder RelocationHolder::none; // its type is relocInfo::none
@ -422,6 +423,30 @@ 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;
@ -578,7 +603,8 @@ void static_stub_Relocation::pack_data_to(CodeSection* dest) {
void static_stub_Relocation::unpack_data() {
address base = binding()->section_start(CodeBuffer::SECT_INSTS);
_static_call = address_from_scaled_offset(unpack_1_int(), base);
jint offset = unpack_1_int();
_static_call = address_from_scaled_offset(offset, base);
}
void trampoline_stub_Relocation::pack_data_to(CodeSection* dest ) {
@ -792,7 +818,8 @@ address opt_virtual_call_Relocation::static_stub() {
RelocIterator iter(code());
while (iter.next()) {
if (iter.type() == relocInfo::static_stub_type) {
if (iter.static_stub_reloc()->static_call() == static_call_addr) {
static_stub_Relocation* stub_reloc = iter.static_stub_reloc();
if (stub_reloc->static_call() == static_call_addr) {
return iter.addr();
}
}
@ -814,7 +841,8 @@ address static_call_Relocation::static_stub() {
RelocIterator iter(code());
while (iter.next()) {
if (iter.type() == relocInfo::static_stub_type) {
if (iter.static_stub_reloc()->static_call() == static_call_addr) {
static_stub_Relocation* stub_reloc = iter.static_stub_reloc();
if (stub_reloc->static_call() == static_call_addr) {
return iter.addr();
}
}