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_S390_SMALLREGISTERMAP_S390_INLINE_HPP
26 #define CPU_S390_SMALLREGISTERMAP_S390_INLINE_HPP
27
28 #include "runtime/frame.inline.hpp"
29 #include "runtime/registerMap.hpp"
30
31 // Java frames don't have callee saved registers (except for rfp), so we can use a smaller RegisterMap
32 class SmallRegisterMap {
33 constexpr SmallRegisterMap() = default;
34 ~SmallRegisterMap() = default;
35 NONCOPYABLE(SmallRegisterMap);
36
37 public:
38 static const SmallRegisterMap* instance() {
39 static constexpr SmallRegisterMap the_instance{};
40 return &the_instance;
41 }
42 private:
43 static void assert_is_rfp(VMReg r) NOT_DEBUG_RETURN
44 DEBUG_ONLY({ Unimplemented(); })
45 public:
46 // as_RegisterMap is used when we didn't want to templatize and abstract over RegisterMap type to support SmallRegisterMap
47 // Consider enhancing SmallRegisterMap to support those cases
48 const RegisterMap* as_RegisterMap() const { return nullptr; }
49 RegisterMap* as_RegisterMap() { return nullptr; }
50
51 RegisterMap* copy_to_RegisterMap(RegisterMap* map, intptr_t* sp) const {
52 Unimplemented();
53 return map;
54 }
55
56 inline address location(VMReg reg, intptr_t* sp) const {
57 Unimplemented();
58 return nullptr;
59 }
60
61 inline void set_location(VMReg reg, address loc) { assert_is_rfp(reg); }
62
63 JavaThread* thread() const {
64 #ifndef ASSERT
65 guarantee (false, "");
66 #endif
67 return nullptr;
68 }
69
70 bool update_map() const { return false; }
71 bool walk_cont() const { return false; }
72 bool include_argument_oops() const { return false; }
73 void set_include_argument_oops(bool f) {}
74 bool in_cont() const { return false; }
75 stackChunkHandle stack_chunk() const { return stackChunkHandle(); }
76
77 #ifdef ASSERT
78 bool should_skip_missing() const { return false; }
79 VMReg find_register_spilled_here(void* p, intptr_t* sp) {
80 Unimplemented();
81 return nullptr;
82 }
83 void print() const { print_on(tty); }
84 void print_on(outputStream* st) const { st->print_cr("Small register map"); }
85 #endif
86 };
87
88 #endif // CPU_S390_SMALLREGISTERMAP_S390_INLINE_HPP
|
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_S390_SMALLREGISTERMAP_S390_INLINE_HPP
26 #define CPU_S390_SMALLREGISTERMAP_S390_INLINE_HPP
27
28 #include "runtime/frame.inline.hpp"
29 #include "runtime/registerMap.hpp"
30
31 class SmallRegisterMap;
32
33 // Java frames don't have callee saved registers (except for rfp), so we can use a smaller SmallRegisterMapType
34 template <bool IncludeArgs>
35 class SmallRegisterMapType {
36 friend SmallRegisterMap;
37
38 constexpr SmallRegisterMapType() = default;
39 ~SmallRegisterMapType() = default;
40 NONCOPYABLE(SmallRegisterMapType);
41
42 static void assert_is_rfp(VMReg r) NOT_DEBUG_RETURN
43 DEBUG_ONLY({ Unimplemented(); })
44 public:
45 // as_RegisterMap is used when we didn't want to templatize and abstract over SmallRegisterMapType type to support SmallRegisterMapType
46 // Consider enhancing SmallRegisterMapType to support those cases
47 const RegisterMap* as_RegisterMap() const { return nullptr; }
48 RegisterMap* as_RegisterMap() { return nullptr; }
49
50 RegisterMap* copy_to_RegisterMap(RegisterMap* map, intptr_t* sp) const {
51 Unimplemented();
52 return map;
53 }
54
55 inline address location(VMReg reg, intptr_t* sp) const {
56 Unimplemented();
57 return nullptr;
58 }
59
60 inline void set_location(VMReg reg, address loc) { assert_is_rfp(reg); }
61
62 JavaThread* thread() const {
63 #ifndef ASSERT
64 guarantee (false, "");
65 #endif
66 return nullptr;
67 }
68
69 bool update_map() const { return false; }
70 bool walk_cont() const { return false; }
71 bool include_argument_oops() const { return IncludeArgs; }
72 void set_include_argument_oops(bool f) {}
73 bool in_cont() const { return false; }
74 stackChunkHandle stack_chunk() const { return stackChunkHandle(); }
75
76 #ifdef ASSERT
77 bool should_skip_missing() const { return false; }
78 VMReg find_register_spilled_here(void* p, intptr_t* sp) {
79 Unimplemented();
80 return nullptr;
81 }
82 void print() const { print_on(tty); }
83 void print_on(outputStream* st) const { st->print_cr("Small register map"); }
84 #endif
85 };
86
87 #endif // CPU_S390_SMALLREGISTERMAP_S390_INLINE_HPP
|