< prev index next >

src/share/vm/code/relocInfo.hpp

Print this page
rev 12121 : [mq]: all_changes.patch

*** 268,278 **** section_word_type = 9, // internal, but a cross-section reference poll_type = 10, // polling instruction for safepoints poll_return_type = 11, // polling instruction for safepoints at return metadata_type = 12, // metadata that used to be oops trampoline_stub_type = 13, // stub-entry for trampoline ! yet_unused_type_1 = 14, // Still unused data_prefix_tag = 15, // tag for a prefix (carries data arguments) type_mask = 15 // A mask which selects only the above values }; protected: --- 268,278 ---- section_word_type = 9, // internal, but a cross-section reference poll_type = 10, // polling instruction for safepoints poll_return_type = 11, // polling instruction for safepoints at return metadata_type = 12, // metadata that used to be oops trampoline_stub_type = 13, // stub-entry for trampoline ! runtime_call_w_cp_type = 14, // Runtime call which may load its target from the constant pool data_prefix_tag = 15, // tag for a prefix (carries data arguments) type_mask = 15 // A mask which selects only the above values }; protected:
*** 303,312 **** --- 303,313 ---- visitor(virtual_call) \ visitor(opt_virtual_call) \ visitor(static_call) \ visitor(static_stub) \ visitor(runtime_call) \ + visitor(runtime_call_w_cp) \ visitor(external_word) \ visitor(internal_word) \ visitor(poll) \ visitor(poll_return) \ visitor(section_word) \
*** 825,836 **** // This method assumes that all virtual/static (inline) caches are cleared (since for static_call_type and // ic_call_type is not always posisition dependent (depending on the state of the cache)). However, this is // probably a reasonable assumption, since empty caches simplifies code reloacation. virtual void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { } - - void print(); }; // certain inlines must be deferred until class Relocation is defined: --- 826,835 ----
*** 1173,1182 **** --- 1172,1211 ---- runtime_call_Relocation() { } public: }; + + class runtime_call_w_cp_Relocation : public CallRelocation { + relocInfo::relocType type() { return relocInfo::runtime_call_w_cp_type; } + + public: + static RelocationHolder spec() { + RelocationHolder rh = newHolder(); + new(rh) runtime_call_w_cp_Relocation(); + return rh; + } + + private: + friend class RelocIterator; + runtime_call_w_cp_Relocation() { _offset = -4; /* <0 = invalid */ } + // On z/Architecture, runtime calls are either a sequence + // of two instructions (load destination of call from constant pool + do call) + // or a pc-relative call. The pc-relative call is faster, but it can only + // be used if the destination of the call is not too far away. + // In order to be able to patch a pc-relative call back into one using + // the constant pool, we have to remember the location of the call's destination + // in the constant pool. + int _offset; + + public: + void set_constant_pool_offset(int offset) { _offset = offset; } + int get_constant_pool_offset() { return _offset; } + void pack_data_to(CodeSection * dest); + void unpack_data(); + }; + // Trampoline Relocations. // A trampoline allows to encode a small branch in the code, even if there // is the chance that this branch can not reach all possible code locations. // If the relocation finds that a branch is too far for the instruction // in the code, it can patch it to jump to the trampoline where is
< prev index next >