Mercurial > hg > truffle
comparison src/cpu/x86/vm/frame_x86.cpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | be4ca325525a 448691f285a5 |
children | 3dbcd1013cc8 |
comparison
equal
deleted
inserted
replaced
3737:9dc19b7d89a3 | 4137:04b9a2566eec |
---|---|
230 | 230 |
231 } | 231 } |
232 | 232 |
233 | 233 |
234 void frame::patch_pc(Thread* thread, address pc) { | 234 void frame::patch_pc(Thread* thread, address pc) { |
235 address* pc_addr = &(((address*) sp())[-1]); | |
235 if (TracePcPatching) { | 236 if (TracePcPatching) { |
236 tty->print_cr("patch_pc at address" INTPTR_FORMAT " [" INTPTR_FORMAT " -> " INTPTR_FORMAT "] ", | 237 tty->print_cr("patch_pc at address " INTPTR_FORMAT " [" INTPTR_FORMAT " -> " INTPTR_FORMAT "]", |
237 &((address *)sp())[-1], ((address *)sp())[-1], pc); | 238 pc_addr, *pc_addr, pc); |
238 } | 239 } |
239 ((address *)sp())[-1] = pc; | 240 // Either the return address is the original one or we are going to |
241 // patch in the same address that's already there. | |
242 assert(_pc == *pc_addr || pc == *pc_addr, "must be"); | |
243 *pc_addr = pc; | |
240 _cb = CodeCache::find_blob(pc); | 244 _cb = CodeCache::find_blob(pc); |
241 address original_pc = nmethod::get_deopt_original_pc(this); | 245 address original_pc = nmethod::get_deopt_original_pc(this); |
242 if (original_pc != NULL) { | 246 if (original_pc != NULL) { |
243 assert(original_pc == _pc, "expected original PC to be stored before patching"); | 247 assert(original_pc == _pc, "expected original PC to be stored before patching"); |
244 _deopt_state = is_deoptimized; | 248 _deopt_state = is_deoptimized; |
664 DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp); | 668 DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp); |
665 } | 669 } |
666 | 670 |
667 } | 671 } |
668 #endif | 672 #endif |
673 | |
674 intptr_t *frame::initial_deoptimization_info() { | |
675 // used to reset the saved FP | |
676 return fp(); | |
677 } |