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