1 /*
 2  * Copyright (c) 2021 SAP SE. All rights reserved.
 3  * Copyright (c) 2021, Red Hat Inc. All rights reserved.
 4  * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
 5  *
 6  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 7  *
 8  * This code is free software; you can redistribute it and/or modify it
 9  * under the terms of the GNU General Public License version 2 only, as
10  * published by the Free Software Foundation.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  *
26  */
27 
28 #include "precompiled.hpp"
29 
30 #include "oops/compressedKlass.hpp"
31 #include "utilities/ostream.hpp"
32 #include "runtime/globals.hpp"
33 
34 #ifdef _LP64
35 
36 // Given an address p, return true if p can be used as an encoding base.
37 //  (Some platforms have restrictions of what constitutes a valid base address).
38 bool CompressedKlassPointers::is_valid_base(address p) {
39   return true;
40 }
41 
42 void CompressedKlassPointers::print_mode(outputStream* st) {
43   st->print_cr("Narrow klass base: " PTR_FORMAT ", Narrow klass shift: %d, "
44                "Narrow klass range: " UINT64_FORMAT, p2i(base()), shift(),
45                KlassEncodingMetaspaceMax);
46 }
47 
48 #endif // _LP64
49