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 #include "precompiled.hpp"
26 #include "code/codeCache.hpp"
27 #include "code/compiledIC.hpp"
28 #include "code/nmethod.hpp"
29 #include "code/relocInfo.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "runtime/stubCodeGenerator.hpp"
32 #include "utilities/copy.hpp"
33
34
35 const RelocationHolder RelocationHolder::none; // its type is relocInfo::none
36
37
38 // Implementation of relocInfo
39
40 #ifdef ASSERT
41 relocInfo::relocInfo(relocType t, int off, int f) {
42 assert(t != data_prefix_tag, "cannot build a prefix this way");
43 assert((t & type_mask) == t, "wrong type");
44 assert((f & format_mask) == f, "wrong format");
45 assert(off >= 0 && off < offset_limit(), "offset out off bounds");
46 assert((off & (offset_unit-1)) == 0, "misaligned offset");
47 (*this) = relocInfo(t, RAW_BITS, off, f);
48 }
49 #endif
50
51 void relocInfo::initialize(CodeSection* dest, Relocation* reloc) {
52 relocInfo* data = this+1; // here's where the data might go
53 dest->set_locs_end(data); // sync end: the next call may read dest.locs_end
|
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 #include "precompiled.hpp"
26 #include "code/codeCache.hpp"
27 #include "code/compiledIC.hpp"
28 #include "code/nmethod.hpp"
29 #include "code/relocInfo.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "runtime/stubCodeGenerator.hpp"
32 #include "utilities/copy.hpp"
33
34 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
35
36 const RelocationHolder RelocationHolder::none; // its type is relocInfo::none
37
38
39 // Implementation of relocInfo
40
41 #ifdef ASSERT
42 relocInfo::relocInfo(relocType t, int off, int f) {
43 assert(t != data_prefix_tag, "cannot build a prefix this way");
44 assert((t & type_mask) == t, "wrong type");
45 assert((f & format_mask) == f, "wrong format");
46 assert(off >= 0 && off < offset_limit(), "offset out off bounds");
47 assert((off & (offset_unit-1)) == 0, "misaligned offset");
48 (*this) = relocInfo(t, RAW_BITS, off, f);
49 }
50 #endif
51
52 void relocInfo::initialize(CodeSection* dest, Relocation* reloc) {
53 relocInfo* data = this+1; // here's where the data might go
54 dest->set_locs_end(data); // sync end: the next call may read dest.locs_end
|