20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
|
25 /* |
|
26 * This file has been modified by Loongson Technology in 2015. These |
|
27 * modifications are Copyright (c) 2015 Loongson Technology, and are made |
|
28 * available on the same license terms set forth above. |
|
29 */ |
|
30 |
25 #ifndef SHARE_VM_CODE_RELOCINFO_HPP |
31 #ifndef SHARE_VM_CODE_RELOCINFO_HPP |
26 #define SHARE_VM_CODE_RELOCINFO_HPP |
32 #define SHARE_VM_CODE_RELOCINFO_HPP |
27 |
33 |
28 #include "memory/allocation.hpp" |
34 #include "memory/allocation.hpp" |
29 #include "utilities/top.hpp" |
35 #include "utilities/top.hpp" |
259 section_word_type = 9, // internal, but a cross-section reference |
265 section_word_type = 9, // internal, but a cross-section reference |
260 poll_type = 10, // polling instruction for safepoints |
266 poll_type = 10, // polling instruction for safepoints |
261 poll_return_type = 11, // polling instruction for safepoints at return |
267 poll_return_type = 11, // polling instruction for safepoints at return |
262 metadata_type = 12, // metadata that used to be oops |
268 metadata_type = 12, // metadata that used to be oops |
263 trampoline_stub_type = 13, // stub-entry for trampoline |
269 trampoline_stub_type = 13, // stub-entry for trampoline |
|
270 #ifndef MIPS64 |
264 yet_unused_type_1 = 14, // Still unused |
271 yet_unused_type_1 = 14, // Still unused |
|
272 #else |
|
273 internal_pc_type = 14, // tag for internal data,?? |
|
274 #endif |
265 data_prefix_tag = 15, // tag for a prefix (carries data arguments) |
275 data_prefix_tag = 15, // tag for a prefix (carries data arguments) |
266 type_mask = 15 // A mask which selects only the above values |
276 type_mask = 15 // A mask which selects only the above values |
267 }; |
277 }; |
268 |
278 |
269 protected: |
279 protected: |
298 visitor(runtime_call) \ |
308 visitor(runtime_call) \ |
299 visitor(external_word) \ |
309 visitor(external_word) \ |
300 visitor(internal_word) \ |
310 visitor(internal_word) \ |
301 visitor(poll) \ |
311 visitor(poll) \ |
302 visitor(poll_return) \ |
312 visitor(poll_return) \ |
303 visitor(section_word) \ |
|
304 visitor(trampoline_stub) \ |
313 visitor(trampoline_stub) \ |
|
314 NOT_MIPS64(visitor(section_word)) MIPS64_ONLY(visitor(internal_pc)) \ |
305 |
315 |
306 |
316 |
307 public: |
317 public: |
308 enum { |
318 enum { |
309 value_width = sizeof(unsigned short) * BitsPerByte, |
319 value_width = sizeof(unsigned short) * BitsPerByte, |
427 #ifdef TARGET_ARCH_arm |
437 #ifdef TARGET_ARCH_arm |
428 # include "relocInfo_arm.hpp" |
438 # include "relocInfo_arm.hpp" |
429 #endif |
439 #endif |
430 #ifdef TARGET_ARCH_ppc |
440 #ifdef TARGET_ARCH_ppc |
431 # include "relocInfo_ppc.hpp" |
441 # include "relocInfo_ppc.hpp" |
|
442 #endif |
|
443 #ifdef TARGET_ARCH_mips |
|
444 # include "relocInfo_mips.hpp" |
432 #endif |
445 #endif |
433 |
446 |
434 |
447 |
435 protected: |
448 protected: |
436 // Derived constant, based on format_width which is PD: |
449 // Derived constant, based on format_width which is PD: |
1019 Metadata** metadata_addr(); // addr or &pool[jint_data] |
1032 Metadata** metadata_addr(); // addr or &pool[jint_data] |
1020 Metadata* metadata_value(); // *metadata_addr |
1033 Metadata* metadata_value(); // *metadata_addr |
1021 // Note: metadata_value transparently converts Universe::non_metadata_word to NULL. |
1034 // Note: metadata_value transparently converts Universe::non_metadata_word to NULL. |
1022 }; |
1035 }; |
1023 |
1036 |
|
1037 #ifdef MIPS64 |
|
1038 // to handle the set_last_java_frame pc |
|
1039 class internal_pc_Relocation : public Relocation { |
|
1040 relocInfo::relocType type() { return relocInfo::internal_pc_type; } |
|
1041 public: |
|
1042 address pc() {pd_get_address_from_code();} |
|
1043 //void fix_relocation_at_move(intptr_t delta); |
|
1044 void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest); |
|
1045 }; |
|
1046 #endif |
1024 |
1047 |
1025 class virtual_call_Relocation : public CallRelocation { |
1048 class virtual_call_Relocation : public CallRelocation { |
1026 relocInfo::relocType type() { return relocInfo::virtual_call_type; } |
1049 relocInfo::relocType type() { return relocInfo::virtual_call_type; } |
1027 |
1050 |
1028 public: |
1051 public: |