1 /*
  2  * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 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_ARM_INSTANCESTACKCHUNKKLASS_ARM_INLINE_HPP
 26 #define CPU_ARM_INSTANCESTACKCHUNKKLASS_ARM_INLINE_HPP
 27 
 28 #include "interpreter/oopMapCache.hpp"
 29 #include "runtime/frame.inline.hpp"
 30 #include "runtime/registerMap.hpp"
 31 
 32 int InstanceStackChunkKlass::metadata_words() {
 33   Unimplemented();
 34   return 0;
 35 }
 36 
 37 int InstanceStackChunkKlass::align_wiggle()   {
 38   Unimplemented();
 39   return 0;
 40 }
 41 
 42 #ifdef ASSERT
 43 template <bool mixed>
 44 inline bool StackChunkFrameStream<mixed>::is_in_frame(void* p0) const {
 45   Unimplemented();
 46   return true;
 47 }
 48 #endif
 49 
 50 template <bool mixed>
 51 inline frame StackChunkFrameStream<mixed>::to_frame() const {
 52   Unimplemented();
 53   return frame();
 54 }
 55 
 56 template <bool mixed>
 57 inline address StackChunkFrameStream<mixed>::get_pc() const {
 58   Unimplemented();
 59   return NULL;
 60 }
 61 
 62 template <bool mixed>
 63 inline intptr_t* StackChunkFrameStream<mixed>::fp() const {
 64   Unimplemented();
 65   return NULL;
 66 }
 67 
 68 template <bool mixed>
 69 inline intptr_t* StackChunkFrameStream<mixed>::derelativize(int offset) const {
 70   Unimplemented();
 71   return NULL;
 72 }
 73 
 74 template <bool mixed>
 75 inline intptr_t* StackChunkFrameStream<mixed>::unextended_sp_for_interpreter_frame() const {
 76   Unimplemented();
 77   return NULL;
 78 }
 79 
 80 template <bool mixed>
 81 intptr_t* StackChunkFrameStream<mixed>::next_sp_for_interpreter_frame() const {
 82   Unimplemented();
 83   return NULL;
 84 }
 85 
 86 template <bool mixed>
 87 inline void StackChunkFrameStream<mixed>::next_for_interpreter_frame() {
 88   Unimplemented();
 89 }
 90 
 91 template <bool mixed>
 92 inline int StackChunkFrameStream<mixed>::interpreter_frame_size() const {
 93   Unimplemented();
 94   return 0;
 95 }
 96 
 97 template <bool mixed>
 98 inline int StackChunkFrameStream<mixed>::interpreter_frame_stack_argsize() const {
 99   Unimplemented();
100   return 0;
101 }
102 
103 template <bool mixed>
104 inline int StackChunkFrameStream<mixed>::interpreter_frame_num_oops() const {
105   Unimplemented();
106   return 0;
107 }
108 
109 inline void stackChunkOopDesc::relativize_frame_pd(frame& fr) const {
110   Unimplemented();
111 }
112 
113 inline void stackChunkOopDesc::derelativize_frame_pd(frame& fr) const {
114   Unimplemented();
115 }
116 
117 template<>
118 template<>
119 inline void StackChunkFrameStream<true>::update_reg_map_pd(RegisterMap* map) {
120   Unimplemented();
121 }
122 
123 template<>
124 template<>
125 inline void StackChunkFrameStream<false>::update_reg_map_pd(RegisterMap* map) {
126   Unimplemented();
127 }
128 
129 template <bool mixed>
130 template <typename RegisterMapT>
131 inline void StackChunkFrameStream<mixed>::update_reg_map_pd(RegisterMapT* map) {}
132 
133 // Java frames don't have callee saved registers (except for rfp), so we can use a smaller RegisterMap
134 class SmallRegisterMap {
135 public:
136   static constexpr SmallRegisterMap* instance = nullptr;
137 private:
138   static void assert_is_rfp(VMReg r) PRODUCT_RETURN
139                                      DEBUG_ONLY({ Unimplemented(); })
140 public:
141   // as_RegisterMap is used when we didn't want to templatize and abstract over RegisterMap type to support SmallRegisterMap
142   // Consider enhancing SmallRegisterMap to support those cases
143   const RegisterMap* as_RegisterMap() const { return nullptr; }
144   RegisterMap* as_RegisterMap() { return nullptr; }
145 
146   RegisterMap* copy_to_RegisterMap(RegisterMap* map, intptr_t* sp) const {
147     Unimplemented();
148     return map;
149   }
150 
151   SmallRegisterMap() {}
152 
153   SmallRegisterMap(const RegisterMap* map) {
154     Unimplemented();
155   }
156 
157   inline address location(VMReg reg, intptr_t* sp) const {
158     Unimplemented();
159     return NULL;
160   }
161 
162   inline void set_location(VMReg reg, address loc) { assert_is_rfp(reg); }
163 
164   JavaThread* thread() const {
165   #ifndef ASSERT
166     guarantee (false, "");
167   #endif
168     return nullptr;
169   }
170 
171   bool update_map()    const { return false; }
172   bool walk_cont()     const { return false; }
173   bool include_argument_oops() const { return false; }
174   void set_include_argument_oops(bool f)  {}
175   bool in_cont()       const { return false; }
176   stackChunkHandle stack_chunk() const { return stackChunkHandle(); }
177 
178 #ifdef ASSERT
179   bool should_skip_missing() const  { return false; }
180   VMReg find_register_spilled_here(void* p, intptr_t* sp) {
181     Unimplemented();
182     return NULL;
183   }
184   void print() const { print_on(tty); }
185   void print_on(outputStream* st) const { st->print_cr("Small register map"); }
186 #endif
187 };
188 
189 #endif // CPU_ARM_INSTANCESTACKCHUNKKLASS_ARM_INLINE_HPP