Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp @ 22193: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 |
comparison
equal
deleted
inserted
replaced
22192:b8c1c277a6ef | 22193:a0d0ecbceeb4 |
---|---|
74 if(_constants_size > 0) { | 74 if(_constants_size > 0) { |
75 _instructions->relocate(pc + NativeMovConstReg::sethi_offset, internal_word_Relocation::spec((address) dest)); | 75 _instructions->relocate(pc + NativeMovConstReg::sethi_offset, internal_word_Relocation::spec((address) dest)); |
76 _instructions->relocate(pc + NativeMovConstReg::add_offset, internal_word_Relocation::spec((address) dest)); | 76 _instructions->relocate(pc + NativeMovConstReg::add_offset, internal_word_Relocation::spec((address) dest)); |
77 } | 77 } |
78 TRACE_jvmci_3("relocating at %p (+%d) with destination at %d", pc, pc_offset, data_offset); | 78 TRACE_jvmci_3("relocating at %p (+%d) with destination at %d", pc, pc_offset, data_offset); |
79 } else { | 79 }else { |
80 int const_size = align_size_up(_constants->end()-_constants->start(), CodeEntryAlignment); | |
80 NativeMovRegMem* load = nativeMovRegMem_at(pc); | 81 NativeMovRegMem* load = nativeMovRegMem_at(pc); |
81 // The base pointer is set 4k off (see SPARCLoadConstantTableBaseOp) | 82 load->set_offset(- (const_size - data_offset)); |
82 load->set_offset(data_offset - (1<<12)); | |
83 TRACE_jvmci_3("relocating ld at %p (+%d) with destination at %d", pc, pc_offset, data_offset); | 83 TRACE_jvmci_3("relocating ld at %p (+%d) with destination at %d", pc, pc_offset, data_offset); |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) { | 87 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) { |