comparison src/cpu/ppc/vm/nativeInst_ppc.cpp @ 17793:c668f307a4c0

8031319: PPC64: Some fixes in ppc and aix coding. Reviewed-by: kvn
author goetz
date Tue, 07 Jan 2014 17:24:59 +0100
parents 67fa91961822
children 327e7269f90d
comparison
equal deleted inserted replaced
17792:4345c6a92f35 17793:c668f307a4c0
69 assert(cb && cb->is_nmethod(), "sanity"); 69 assert(cb && cb->is_nmethod(), "sanity");
70 nmethod *nm = (nmethod *)cb; 70 nmethod *nm = (nmethod *)cb;
71 if (nm->stub_contains(destination) && is_NativeCallTrampolineStub_at(destination)) { 71 if (nm->stub_contains(destination) && is_NativeCallTrampolineStub_at(destination)) {
72 // Yes we do, so get the destination from the trampoline stub. 72 // Yes we do, so get the destination from the trampoline stub.
73 const address trampoline_stub_addr = destination; 73 const address trampoline_stub_addr = destination;
74 destination = NativeCallTrampolineStub_at(trampoline_stub_addr)->destination(); 74 destination = NativeCallTrampolineStub_at(trampoline_stub_addr)->destination(nm);
75 } 75 }
76 76
77 return destination; 77 return destination;
78 } 78 }
79 79
369 "must be a ld with large offset (from the constant pool)"); 369 "must be a ld with large offset (from the constant pool)");
370 370
371 return instruction_addr; 371 return instruction_addr;
372 } 372 }
373 373
374 address NativeCallTrampolineStub::destination() const { 374 address NativeCallTrampolineStub::destination(nmethod *nm) const {
375 CodeBlob* cb = CodeCache::find_blob(addr_at(0)); 375 CodeBlob* cb = nm ? nm : CodeCache::find_blob_unsafe(addr_at(0));
376 address ctable = cb->content_begin(); 376 address ctable = cb->content_begin();
377 377
378 return *(address*)(ctable + destination_toc_offset()); 378 return *(address*)(ctable + destination_toc_offset());
379 } 379 }
380 380