Mercurial > hg > truffle
comparison src/cpu/x86/vm/graalCodeInstaller_x86.cpp @ 18854:b8d3f84740c7
guarded use of 64-bit only code with #ifdefs
Contributed-by: Igor Ignatyev <igor.ignatyev@oracle.com>
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 13 Jan 2015 12:59:48 +0100 |
parents | d611982fb10e |
children |
comparison
equal
deleted
inserted
replaced
18853:90fb04cda7d6 | 18854:b8d3f84740c7 |
---|---|
65 void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle& constant) { | 65 void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle& constant) { |
66 address pc = _instructions->start() + pc_offset; | 66 address pc = _instructions->start() + pc_offset; |
67 Handle obj = HotSpotObjectConstantImpl::object(constant); | 67 Handle obj = HotSpotObjectConstantImpl::object(constant); |
68 jobject value = JNIHandles::make_local(obj()); | 68 jobject value = JNIHandles::make_local(obj()); |
69 if (HotSpotObjectConstantImpl::compressed(constant)) { | 69 if (HotSpotObjectConstantImpl::compressed(constant)) { |
70 #ifdef _LP64 | |
70 address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand); | 71 address operand = Assembler::locate_operand(pc, Assembler::narrow_oop_operand); |
71 int oop_index = _oop_recorder->find_index(value); | 72 int oop_index = _oop_recorder->find_index(value); |
72 _instructions->relocate(pc, oop_Relocation::spec(oop_index), Assembler::narrow_oop_operand); | 73 _instructions->relocate(pc, oop_Relocation::spec(oop_index), Assembler::narrow_oop_operand); |
73 TRACE_graal_3("relocating (narrow oop constant) at %p/%p", pc, operand); | 74 TRACE_graal_3("relocating (narrow oop constant) at %p/%p", pc, operand); |
75 #else | |
76 fatal("compressed oop on 32bit"); | |
77 #endif | |
74 } else { | 78 } else { |
75 address operand = Assembler::locate_operand(pc, Assembler::imm_operand); | 79 address operand = Assembler::locate_operand(pc, Assembler::imm_operand); |
76 *((jobject*) operand) = value; | 80 *((jobject*) operand) = value; |
77 _instructions->relocate(pc, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); | 81 _instructions->relocate(pc, oop_Relocation::spec_for_immediate(), Assembler::imm_operand); |
78 TRACE_graal_3("relocating (oop constant) at %p/%p", pc, operand); | 82 TRACE_graal_3("relocating (oop constant) at %p/%p", pc, operand); |