Mercurial > hg > truffle
comparison src/cpu/x86/vm/graalCodeInstaller_x86.hpp @ 11760:ce0b00597980
made safepoint-on-return use specialized HotSpot runtime support for such safepoints (which have no debug info attached)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 24 Sep 2013 08:51:02 +0200 |
parents | 4e1db4c9d4c5 |
children | 4c96ccce3772 |
comparison
equal
deleted
inserted
replaced
11759:8bcd76c3f23b | 11760:ce0b00597980 |
---|---|
18 * | 18 * |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 #ifndef CPU_SPARC_VM_CODEINSTALLER_X86_HPP | 23 #ifndef CPU_X86_VM_CODEINSTALLER_X86_HPP |
24 #define CPU_SPARC_VM_CODEINSTALLER_X86_HPP | 24 #define CPU_X86_VM_CODEINSTALLER_X86_HPP |
25 | 25 |
26 #include "compiler/disassembler.hpp" | 26 #include "compiler/disassembler.hpp" |
27 #include "runtime/javaCalls.hpp" | 27 #include "runtime/javaCalls.hpp" |
28 #include "graal/graalEnv.hpp" | 28 #include "graal/graalEnv.hpp" |
29 #include "graal/graalCompiler.hpp" | 29 #include "graal/graalCompiler.hpp" |
205 default: | 205 default: |
206 break; | 206 break; |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 inline int32_t* CodeInstaller::pd_locate_operand(address instruction) { | 210 inline void CodeInstaller::pd_relocate_poll(address pc, jint mark) { |
211 return (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); | 211 switch (mark) { |
212 } | 212 case MARK_POLL_NEAR: { |
213 | 213 NativeInstruction* ni = nativeInstruction_at(pc); |
214 #endif // CPU_SPARC_VM_CODEINSTALLER_X86_HPP | 214 int32_t* disp = (int32_t*) Assembler::locate_operand(pc, Assembler::disp32_operand); |
215 | 215 // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); |
216 int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand | |
217 intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni; | |
218 *disp = (int32_t)new_disp; | |
219 } | |
220 case MARK_POLL_FAR: | |
221 _instructions->relocate(pc, relocInfo::poll_type); | |
222 break; | |
223 case MARK_POLL_RETURN_NEAR: { | |
224 NativeInstruction* ni = nativeInstruction_at(pc); | |
225 int32_t* disp = (int32_t*) Assembler::locate_operand(pc, Assembler::disp32_operand); | |
226 // int32_t* disp = (int32_t*) Assembler::locate_operand(instruction, Assembler::disp32_operand); | |
227 int32_t offset = *disp; // The Java code installed the polling page offset into the disp32 operand | |
228 intptr_t new_disp = (intptr_t) (os::get_polling_page() + offset) - (intptr_t) ni; | |
229 *disp = (int32_t)new_disp; | |
230 } | |
231 case MARK_POLL_RETURN_FAR: | |
232 _instructions->relocate(pc, relocInfo::poll_return_type); | |
233 break; | |
234 default: | |
235 ShouldNotReachHere(); | |
236 break; | |
237 } | |
238 } | |
239 | |
240 #endif // CPU_X86_VM_CODEINSTALLER_X86_HPP | |
241 |