< prev index next >

src/hotspot/share/code/relocInfo.hpp

Print this page

1270 
1271   void copy_into(RelocationHolder& holder) const override;
1272 
1273  private:
1274   address _owner;    // Address of the NativeCall that owns the trampoline.
1275 
1276   trampoline_stub_Relocation(address owner)
1277     : Relocation(relocInfo::trampoline_stub_type),
1278       _owner(owner) { }
1279 
1280   friend class RelocationHolder;
1281   trampoline_stub_Relocation() : Relocation(relocInfo::trampoline_stub_type) { }
1282 
1283  public:
1284 
1285   // Return the address of the NativeCall that owns the trampoline.
1286   address owner() { return _owner; }
1287 
1288   void pack_data_to(CodeSection * dest) override;
1289   void unpack_data() override;


















1290 
1291   // Find the trampoline stub for a call.
1292   static address get_trampoline_for(address call, nmethod* code);
1293 };
1294 
1295 class external_word_Relocation : public DataRelocation {
1296  public:
1297   static RelocationHolder spec(address target) {
1298     assert(target != nullptr, "must not be null");
1299     return RelocationHolder::construct<external_word_Relocation>(target);
1300   }
1301 
1302   // Use this one where all 32/64 bits of the target live in the code stream.
1303   // The target must be an intptr_t, and must be absolute (not relative).
1304   static RelocationHolder spec_for_immediate() {
1305     return RelocationHolder::construct<external_word_Relocation>(nullptr);
1306   }
1307 
1308   void copy_into(RelocationHolder& holder) const override;
1309 

1270 
1271   void copy_into(RelocationHolder& holder) const override;
1272 
1273  private:
1274   address _owner;    // Address of the NativeCall that owns the trampoline.
1275 
1276   trampoline_stub_Relocation(address owner)
1277     : Relocation(relocInfo::trampoline_stub_type),
1278       _owner(owner) { }
1279 
1280   friend class RelocationHolder;
1281   trampoline_stub_Relocation() : Relocation(relocInfo::trampoline_stub_type) { }
1282 
1283  public:
1284 
1285   // Return the address of the NativeCall that owns the trampoline.
1286   address owner() { return _owner; }
1287 
1288   void pack_data_to(CodeSection * dest) override;
1289   void unpack_data() override;
1290 #if defined(AARCH64) && !defined(ZERO)
1291   address pd_destination     ();
1292   void    pd_set_destination (address x);
1293 #else
1294   address pd_destination     () {
1295     fatal("trampoline_stub_Relocation::destination() unimplemented");
1296     return (address)-1;
1297   }
1298   void    pd_set_destination (address x) {
1299     fatal("trampoline_stub_Relocation::set_destination() unimplemented");
1300   }
1301 #endif
1302   address destination() {
1303     return pd_destination();
1304   }
1305   void    set_destination(address x) {
1306     pd_set_destination(x);
1307   }
1308 
1309   // Find the trampoline stub for a call.
1310   static address get_trampoline_for(address call, nmethod* code);
1311 };
1312 
1313 class external_word_Relocation : public DataRelocation {
1314  public:
1315   static RelocationHolder spec(address target) {
1316     assert(target != nullptr, "must not be null");
1317     return RelocationHolder::construct<external_word_Relocation>(target);
1318   }
1319 
1320   // Use this one where all 32/64 bits of the target live in the code stream.
1321   // The target must be an intptr_t, and must be absolute (not relative).
1322   static RelocationHolder spec_for_immediate() {
1323     return RelocationHolder::construct<external_word_Relocation>(nullptr);
1324   }
1325 
1326   void copy_into(RelocationHolder& holder) const override;
1327 
< prev index next >