comparison src/cpu/sparc/vm/graalCodeInstaller_sparc.cpp @ 16316:989ab80382c1

Using absolute addressing instead of pc relative in fixup.
author Stefan Anzinger <stefan.anzinger@gmail.com>
date Mon, 02 Jun 2014 20:41:44 +0200
parents 063ec2920d21
children 0e34c7fbd288
comparison
equal deleted inserted replaced
16315:b955d649fca8 16316:989ab80382c1
57 } 57 }
58 } 58 }
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 jint offset = DataSectionReference::offset(data); 63 jint offset = DataSectionReference::offset(data);
63 64
64 NativeMovRegMem* load = nativeMovRegMem_at(pc); 65 NativeMovRegMem* load = nativeMovRegMem_at(pc);
65 int disp = _constants_size + pc_offset - offset - BytesPerInstWord; 66 load->add_offset_in_bytes((long)const_start+offset);
66 load->set_offset(-disp);
67 } 67 }
68 68
69 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) { 69 void CodeInstaller::pd_relocate_CodeBlob(CodeBlob* cb, NativeInstruction* inst) {
70 fatal("CodeInstaller::pd_relocate_CodeBlob - sparc unimp"); 70 fatal("CodeInstaller::pd_relocate_CodeBlob - sparc unimp");
71 } 71 }