mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
7035861: linux-armsflt: assert(ni->data() == (int)(x + o)) failed: instructions must match
The change avoids generating relocation info entry for the staging area patching stub on systems that don't support movw/movt instructions Reviewed-by: bdelsart
This commit is contained in:
parent
0ab6045255
commit
46259d93ba
1 changed files with 13 additions and 1 deletions
|
@ -1026,9 +1026,21 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* thread, Runtime1::StubID stub_i
|
||||||
// first replace the tail, then the call
|
// first replace the tail, then the call
|
||||||
#ifdef ARM
|
#ifdef ARM
|
||||||
if(stub_id == Runtime1::load_klass_patching_id && !VM_Version::supports_movw()) {
|
if(stub_id == Runtime1::load_klass_patching_id && !VM_Version::supports_movw()) {
|
||||||
|
nmethod* nm = CodeCache::find_nmethod(instr_pc);
|
||||||
|
oop* oop_addr = NULL;
|
||||||
|
assert(nm != NULL, "invalid nmethod_pc");
|
||||||
|
RelocIterator oops(nm, copy_buff, copy_buff + 1);
|
||||||
|
while (oops.next()) {
|
||||||
|
if (oops.type() == relocInfo::oop_type) {
|
||||||
|
oop_Relocation* r = oops.oop_reloc();
|
||||||
|
oop_addr = r->oop_addr();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assert(oop_addr != NULL, "oop relocation must exist");
|
||||||
copy_buff -= *byte_count;
|
copy_buff -= *byte_count;
|
||||||
NativeMovConstReg* n_copy2 = nativeMovConstReg_at(copy_buff);
|
NativeMovConstReg* n_copy2 = nativeMovConstReg_at(copy_buff);
|
||||||
n_copy2->set_data((intx) (load_klass()), instr_pc);
|
n_copy2->set_pc_relative_offset((address)oop_addr, instr_pc);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue