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_PPC_SMALLREGISTERMAP_PPC_INLINE_HPP
26 #define CPU_PPC_SMALLREGISTERMAP_PPC_INLINE_HPP
27
28 #include "runtime/frame.inline.hpp"
29 #include "runtime/registerMap.hpp"
30
31 // Java frames don't have callee saved registers, 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
43 // as_RegisterMap is used when we didn't want to templatize and abstract over RegisterMap type to support SmallRegisterMap
44 // Consider enhancing SmallRegisterMap to support those cases
45 const RegisterMap* as_RegisterMap() const { return nullptr; }
46 RegisterMap* as_RegisterMap() { return nullptr; }
47
48 RegisterMap* copy_to_RegisterMap(RegisterMap* map, intptr_t* sp) const {
49 map->clear();
50 map->set_include_argument_oops(this->include_argument_oops());
51 return map;
52 }
53
54 inline address location(VMReg reg, intptr_t* sp) const {
55 assert(false, "Reg: %s", reg->name());
56 return nullptr;
57 }
58
59 // Should not reach here
60 inline void set_location(VMReg reg, address loc) { assert(false, "Reg: %s", reg->name()); }
61
62 JavaThread* thread() const {
63 #ifndef ASSERT
64 guarantee (false, "");
|
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_PPC_SMALLREGISTERMAP_PPC_INLINE_HPP
26 #define CPU_PPC_SMALLREGISTERMAP_PPC_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, so we can use a smaller RegisterMap
34 template <bool IncludeArgs>
35 class SmallRegisterMapType {
36 friend SmallRegisterMap;
37
38 constexpr SmallRegisterMapType() = default;
39 ~SmallRegisterMapType() = default;
40 NONCOPYABLE(SmallRegisterMapType);
41
42 public:
43 // as_RegisterMap is used when we didn't want to templatize and abstract over RegisterMap type to support SmallRegisterMapType
44 // Consider enhancing SmallRegisterMapType to support those cases
45 const RegisterMap* as_RegisterMap() const { return nullptr; }
46 RegisterMap* as_RegisterMap() { return nullptr; }
47
48 RegisterMap* copy_to_RegisterMap(RegisterMap* map, intptr_t* sp) const {
49 map->clear();
50 map->set_include_argument_oops(this->include_argument_oops());
51 return map;
52 }
53
54 inline address location(VMReg reg, intptr_t* sp) const {
55 assert(false, "Reg: %s", reg->name());
56 return nullptr;
57 }
58
59 // Should not reach here
60 inline void set_location(VMReg reg, address loc) { assert(false, "Reg: %s", reg->name()); }
61
62 JavaThread* thread() const {
63 #ifndef ASSERT
64 guarantee (false, "");
|