comparison src/share/vm/code/relocInfo.hpp @ 13553:d49f00604347

removed poll_Relocation::pollingForm type and associated data field and rely solely on format field of safepoint relocation entries when deciding whether or not to relocate the operand of a safepoint poll instruction
author Doug Simon <doug.simon@oracle.com>
date Wed, 08 Jan 2014 16:57:30 +0100
parents fa5180b3c18e
children d2c8b553f621
comparison
equal deleted inserted replaced
13552:c9daba2a2bac 13553:d49f00604347
211 // //%note reloc_2 211 // //%note reloc_2
212 // 212 //
213 // relocInfo::poll_[return_]type -- a safepoint poll 213 // relocInfo::poll_[return_]type -- a safepoint poll
214 // Value: none 214 // Value: none
215 // Instruction types: memory load or test 215 // Instruction types: memory load or test
216 // Data: [] the associated set-oops are adjacent to the call 216 // Data: none
217 // [n] n is a poll_Relocation::pollingForm value
218 // 217 //
219 // For example: 218 // For example:
220 // 219 //
221 // INSTRUCTIONS RELOC: TYPE PREFIX DATA 220 // INSTRUCTIONS RELOC: TYPE PREFIX DATA
222 // ------------ ---- ----------- 221 // ------------ ---- -----------
1275 private: 1274 private:
1276 friend class RelocIterator; 1275 friend class RelocIterator;
1277 section_word_Relocation() { } 1276 section_word_Relocation() { }
1278 }; 1277 };
1279 1278
1279
1280 class poll_Relocation : public Relocation { 1280 class poll_Relocation : public Relocation {
1281 public: 1281 bool is_data() { return true; }
1282 enum pollingForm {
1283 pc_relative,
1284 absolute
1285 };
1286 relocInfo::relocType type() { return relocInfo::poll_type; } 1282 relocInfo::relocType type() { return relocInfo::poll_type; }
1287 bool is_data() { return true; }
1288 void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest); 1283 void fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest);
1289 private:
1290 pollingForm _form;
1291 public:
1292
1293 static RelocationHolder spec(poll_Relocation::pollingForm form) {
1294 RelocationHolder rh = newHolder();
1295 new(rh) poll_Relocation(form);
1296 return rh;
1297 }
1298
1299 poll_Relocation(poll_Relocation::pollingForm form) {
1300 _form = form;
1301 }
1302 poll_Relocation::pollingForm form() { return _form; }
1303
1304 void pack_data_to(CodeSection* dest);
1305 void unpack_data();
1306
1307 protected:
1308 friend class RelocIterator;
1309 poll_Relocation() { }
1310 }; 1284 };
1311 1285
1312 class poll_return_Relocation : public poll_Relocation { 1286 class poll_return_Relocation : public poll_Relocation {
1313 public:
1314 relocInfo::relocType type() { return relocInfo::poll_return_type; } 1287 relocInfo::relocType type() { return relocInfo::poll_return_type; }
1315
1316 static RelocationHolder spec(poll_Relocation::pollingForm distance) {
1317 RelocationHolder rh = newHolder();
1318 new(rh) poll_return_Relocation(distance);
1319 return rh;
1320 }
1321
1322 poll_return_Relocation(poll_Relocation::pollingForm distance) : poll_Relocation(distance) { }
1323
1324 private:
1325 friend class RelocIterator;
1326 poll_return_Relocation() { }
1327 }; 1288 };
1328 1289
1329 // We know all the xxx_Relocation classes, so now we can define these: 1290 // We know all the xxx_Relocation classes, so now we can define these:
1330 #define EACH_CASE(name) \ 1291 #define EACH_CASE(name) \
1331 inline name##_Relocation* RelocIterator::name##_reloc() { \ 1292 inline name##_Relocation* RelocIterator::name##_reloc() { \