Mercurial > hg > graal-compiler
diff src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp @ 22195:a0d0ecbceeb4
[SPARC] Use rdpc for constructing constant table base
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Thu, 09 Jul 2015 15:58:01 +0200 |
parents | d9f3acb4a9a1 |
children | 339beb637508 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp Thu Jul 09 15:57:22 2015 +0200 +++ b/src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp Thu Jul 09 15:58:01 2015 +0200 @@ -76,10 +76,10 @@ _instructions->relocate(pc + NativeMovConstReg::add_offset, internal_word_Relocation::spec((address) dest)); } TRACE_jvmci_3("relocating at %p (+%d) with destination at %d", pc, pc_offset, data_offset); - } else { + }else { + int const_size = align_size_up(_constants->end()-_constants->start(), CodeEntryAlignment); NativeMovRegMem* load = nativeMovRegMem_at(pc); - // The base pointer is set 4k off (see SPARCLoadConstantTableBaseOp) - load->set_offset(data_offset - (1<<12)); + load->set_offset(- (const_size - data_offset)); TRACE_jvmci_3("relocating ld at %p (+%d) with destination at %d", pc, pc_offset, data_offset); } }