< prev index next >

src/hotspot/share/code/relocInfo.hpp

Print this page

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


















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

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