# HG changeset patch # User Stefan Anzinger # Date 1405642599 25200 # Node ID 0e34c7fbd28849d4d074e18926c6c3d23ad67c87 # Parent 29ac953be681fbe732c420c293162a4c18cfbb7d [SPARC] Add relocation info for constant reference to constant section diff -r 29ac953be681 -r 0e34c7fbd288 src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp --- a/src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp Wed Jul 16 08:50:11 2014 -0700 +++ b/src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp Thu Jul 17 17:16:39 2014 -0700 @@ -61,9 +61,11 @@ address pc = _instructions->start() + pc_offset; address const_start = _constants->start(); jint offset = DataSectionReference::offset(data); + address dest = _constants->start() + offset; - NativeMovRegMem* load = nativeMovRegMem_at(pc); - load->add_offset_in_bytes((long)const_start+offset); + _instructions->relocate(pc + NativeMovConstReg::sethi_offset, internal_word_Relocation::spec((address) dest)); + _instructions->relocate(pc + NativeMovConstReg::add_offset, internal_word_Relocation::spec((address) dest)); + TRACE_graal_3("relocating at %p with destination at %p (%d)", pc, dest, offset); } void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) {