< prev index next >

src/hotspot/cpu/ppc/continuationHelper_ppc.inline.hpp

Print this page

 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 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
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef CPU_PPC_CONTINUATIONHELPER_PPC_INLINE_HPP
 26 #define CPU_PPC_CONTINUATIONHELPER_PPC_INLINE_HPP
 27 
 28 #include "runtime/continuationHelper.hpp"
 29 
 30 template<typename FKind>
 31 static inline intptr_t** link_address(const frame& f) {
 32   Unimplemented();
 33   return nullptr;
 34 }
 35 




 36 inline int ContinuationHelper::frame_align_words(int size) {
 37   return size & 1;
 38 }
 39 
 40 inline intptr_t* ContinuationHelper::frame_align_pointer(intptr_t* p) {
 41   return align_down(p, frame::frame_alignment);
 42 }
 43 
 44 template<typename FKind>
 45 inline void ContinuationHelper::update_register_map(const frame& f, RegisterMap* map) {
 46   // Currently all registers are considered to be volatile and saved in the caller (java) frame if needed
 47 }
 48 
 49 inline void ContinuationHelper::update_register_map_with_callee(const frame& f, RegisterMap* map) {
 50   // Currently all registers are considered to be volatile and saved in the caller (java) frame if needed
 51 }
 52 
 53 inline void ContinuationHelper::push_pd(const frame& f) {
 54   f.own_abi()->callers_sp = (uint64_t)f.fp();
 55 }
 56 
 57 
 58 inline void ContinuationHelper::set_anchor_to_entry_pd(JavaFrameAnchor* anchor, ContinuationEntry* cont) {
 59   // nothing to do
 60 }
 61 
 62 #ifdef ASSERT
 63 inline void ContinuationHelper::set_anchor_pd(JavaFrameAnchor* anchor, intptr_t* sp) {
 64   // nothing to do
 65 }
 66 

 67 inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
 68   intptr_t* sp = f.sp();
 69   address pc = *(address*)(sp - frame::sender_sp_ret_address_offset());
 70   intptr_t* fp = (intptr_t*)f.own_abi()->callers_sp;
 71   assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
 72   assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
 73   return f.raw_pc() == pc && f.fp() == fp;
 74 }
 75 #endif
 76 
 77 inline intptr_t** ContinuationHelper::Frame::callee_link_address(const frame& f) {
 78   return (intptr_t**)&f.own_abi()->callers_sp;
 79 }
 80 
 81 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
 82   return (address*)&f.callers_abi()->lr;
 83 }
 84 
 85 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
 86   intptr_t* sp = caller.unextended_sp();

 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 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
 21  * questions.
 22  *
 23  */
 24 
 25 #ifndef CPU_PPC_CONTINUATIONHELPER_PPC_INLINE_HPP
 26 #define CPU_PPC_CONTINUATIONHELPER_PPC_INLINE_HPP
 27 
 28 #include "runtime/continuationHelper.hpp"
 29 
 30 template<typename FKind>
 31 static inline intptr_t** link_address(const frame& f) {
 32   Unimplemented();
 33   return nullptr;
 34 }
 35 
 36 static inline void patch_return_pc_with_preempt_stub(frame& f) {
 37   Unimplemented();
 38 }
 39 
 40 inline int ContinuationHelper::frame_align_words(int size) {
 41   return size & 1;
 42 }
 43 
 44 inline intptr_t* ContinuationHelper::frame_align_pointer(intptr_t* p) {
 45   return align_down(p, frame::frame_alignment);
 46 }
 47 
 48 template<typename FKind>
 49 inline void ContinuationHelper::update_register_map(const frame& f, RegisterMap* map) {
 50   // Currently all registers are considered to be volatile and saved in the caller (java) frame if needed
 51 }
 52 
 53 inline void ContinuationHelper::update_register_map_with_callee(const frame& f, RegisterMap* map) {
 54   // Currently all registers are considered to be volatile and saved in the caller (java) frame if needed
 55 }
 56 
 57 inline void ContinuationHelper::push_pd(const frame& f) {
 58   f.own_abi()->callers_sp = (uint64_t)f.fp();
 59 }
 60 
 61 
 62 inline void ContinuationHelper::set_anchor_to_entry_pd(JavaFrameAnchor* anchor, ContinuationEntry* cont) {
 63   // nothing to do
 64 }
 65 

 66 inline void ContinuationHelper::set_anchor_pd(JavaFrameAnchor* anchor, intptr_t* sp) {
 67   // nothing to do
 68 }
 69 
 70 #ifdef ASSERT
 71 inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
 72   intptr_t* sp = f.sp();
 73   address pc = *(address*)(sp - frame::sender_sp_ret_address_offset());
 74   intptr_t* fp = (intptr_t*)f.own_abi()->callers_sp;
 75   assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
 76   assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
 77   return f.raw_pc() == pc && f.fp() == fp;
 78 }
 79 #endif
 80 
 81 inline intptr_t** ContinuationHelper::Frame::callee_link_address(const frame& f) {
 82   return (intptr_t**)&f.own_abi()->callers_sp;
 83 }
 84 
 85 inline address* ContinuationHelper::InterpretedFrame::return_pc_address(const frame& f) {
 86   return (address*)&f.callers_abi()->lr;
 87 }
 88 
 89 inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, const frame& caller) {
 90   intptr_t* sp = caller.unextended_sp();
< prev index next >