comparison src/share/vm/code/nmethod.hpp @ 16657:ab59ee6c581b

[SPARC] Fix deoptimization fixup of return pc when called via the deoptimization entry
author Stefan Anzinger <stefan.anzinger@gmail.com>
date Wed, 30 Jul 2014 08:40:08 -0700
parents 4ca6dc0799b6
children 52b4284cb496
comparison
equal deleted inserted replaced
16656:5391f043d5f5 16657:ab59ee6c581b
641 // Return true is the PC is one would expect if the frame is being deopted. 641 // Return true is the PC is one would expect if the frame is being deopted.
642 bool is_deopt_pc (address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); } 642 bool is_deopt_pc (address pc) { return is_deopt_entry(pc) || is_deopt_mh_entry(pc); }
643 643
644 // (thomaswue) When using graal, the address might be off by 5 (because this is the size of the call instruction. 644 // (thomaswue) When using graal, the address might be off by 5 (because this is the size of the call instruction.
645 // (thomaswue) TODO: Replace this by a more general mechanism. 645 // (thomaswue) TODO: Replace this by a more general mechanism.
646 bool is_deopt_entry (address pc) { return pc == deopt_handler_begin() GRAAL_ONLY( || pc == deopt_handler_begin() + 5); } 646 // (sanzinger) SPARC has another offset, looked for some variable existing in HotSpot which describes this offset, but i have not
647 // found anything.
648 bool is_deopt_entry (address pc) {
649 return pc == deopt_handler_begin()
650 #ifdef GRAAL
651 || pc == deopt_handler_begin() +
652 #ifdef TARGET_ARCH_sparc
653 8
654 #endif // sparc
655 #ifdef TARGET_ARCH_x86
656 5
657 #endif // x86
658 #endif // GRAAL
659 ;
660 }
647 bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); } 661 bool is_deopt_mh_entry(address pc) { return pc == deopt_mh_handler_begin(); }
648 // Accessor/mutator for the original pc of a frame before a frame was deopted. 662 // Accessor/mutator for the original pc of a frame before a frame was deopted.
649 address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); } 663 address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }
650 void set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; } 664 void set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; }
651 665