Mercurial > hg > graal-compiler
changeset 3271:cdd13dce903e
Merge
author | vladidan |
---|---|
date | Sat, 23 Apr 2011 00:33:38 -0400 |
parents | 49bd9c6f7bce (diff) 732454aaf5cb (current diff) |
children | 01147d8aac1d |
files | |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Runtime1.cpp Wed Apr 20 20:32:45 2011 -0700 +++ b/src/share/vm/c1/c1_Runtime1.cpp Sat Apr 23 00:33:38 2011 -0400 @@ -1026,9 +1026,21 @@ // first replace the tail, then the call #ifdef ARM 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; 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