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)
1293 address pd_destination ();
1294 void pd_set_destination (address x);
1295 #endif
1296 address destination() {
1297 #if defined(AARCH64)
1298 return pd_destination();
1299 #else
1300 fatal("trampoline_stub_Relocation::destination() unimplemented");
1301 return (address)-1;
1302 #endif
1303 }
1304 void set_destination(address x) {
1305 #if defined(AARCH64)
1306 pd_set_destination(x);
1307 #else
1308 fatal("trampoline_stub_Relocation::set_destination() unimplemented");
1309 #endif
1310 }
1311
1312 // Find the trampoline stub for a call.
1313 static address get_trampoline_for(address call, nmethod* code);
1314 };
1315
1316 class external_word_Relocation : public DataRelocation {
1317 public:
1318 static RelocationHolder spec(address target) {
1319 assert(target != nullptr, "must not be null");
1320 return RelocationHolder::construct<external_word_Relocation>(target);
1321 }
1322
1323 // Use this one where all 32/64 bits of the target live in the code stream.
1324 // The target must be an intptr_t, and must be absolute (not relative).
1325 static RelocationHolder spec_for_immediate() {
1326 return RelocationHolder::construct<external_word_Relocation>(nullptr);
1327 }
1328
1329 void copy_into(RelocationHolder& holder) const override;
1330
|