comparison src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp @ 16631:0e34c7fbd288

[SPARC] Add relocation info for constant reference to constant section
author Stefan Anzinger <stefan.anzinger@gmail.com>
date Thu, 17 Jul 2014 17:16:39 -0700
parents 989ab80382c1
children 4e2d34d7715b
comparison
equal deleted inserted replaced
16630:29ac953be681 16631:0e34c7fbd288
59 59
60 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, oop data) { 60 void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, oop data) {
61 address pc = _instructions->start() + pc_offset; 61 address pc = _instructions->start() + pc_offset;
62 address const_start = _constants->start(); 62 address const_start = _constants->start();
63 jint offset = DataSectionReference::offset(data); 63 jint offset = DataSectionReference::offset(data);
64 address dest = _constants->start() + offset;
64 65
65 NativeMovRegMem* load = nativeMovRegMem_at(pc); 66 _instructions->relocate(pc + NativeMovConstReg::sethi_offset, internal_word_Relocation::spec((address) dest));
66 load->add_offset_in_bytes((long)const_start+offset); 67 _instructions->relocate(pc + NativeMovConstReg::add_offset, internal_word_Relocation::spec((address) dest));
68 TRACE_graal_3("relocating at %p with destination at %p (%d)", pc, dest, offset);
67 } 69 }
68 70
69 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) { 71 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) {
70 fatal("CodeInstaller::pd_relocate_CodeBlob - sparc unimp"); 72 fatal("CodeInstaller::pd_relocate_CodeBlob - sparc unimp");
71 } 73 }