src/hotspot/cpu/x86/x86_64.ad
changeset 54120 677cede5608e
parent 54022 ff399127078a
child 54750 1851a532ddfe
equal deleted inserted replaced
54119:6bf8877eb1b9 54120:677cede5608e
   545 void emit_d32_reloc(CodeBuffer& cbuf, int d32, RelocationHolder const& rspec, int format) {
   545 void emit_d32_reloc(CodeBuffer& cbuf, int d32, RelocationHolder const& rspec, int format) {
   546 #ifdef ASSERT
   546 #ifdef ASSERT
   547   if (rspec.reloc()->type() == relocInfo::oop_type &&
   547   if (rspec.reloc()->type() == relocInfo::oop_type &&
   548       d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
   548       d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
   549     assert(Universe::heap()->is_in_reserved((address)(intptr_t)d32), "should be real oop");
   549     assert(Universe::heap()->is_in_reserved((address)(intptr_t)d32), "should be real oop");
   550     assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop((intptr_t)d32))), "cannot embed scavengable oops in code");
   550     assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)), "cannot embed broken oops in code");
   551   }
   551   }
   552 #endif
   552 #endif
   553   cbuf.relocate(cbuf.insts_mark(), rspec, format);
   553   cbuf.relocate(cbuf.insts_mark(), rspec, format);
   554   cbuf.insts()->emit_int32(d32);
   554   cbuf.insts()->emit_int32(d32);
   555 }
   555 }
   572 void emit_d64_reloc(CodeBuffer& cbuf, int64_t d64, RelocationHolder const& rspec, int format) {
   572 void emit_d64_reloc(CodeBuffer& cbuf, int64_t d64, RelocationHolder const& rspec, int format) {
   573 #ifdef ASSERT
   573 #ifdef ASSERT
   574   if (rspec.reloc()->type() == relocInfo::oop_type &&
   574   if (rspec.reloc()->type() == relocInfo::oop_type &&
   575       d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
   575       d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
   576     assert(Universe::heap()->is_in_reserved((address)d64), "should be real oop");
   576     assert(Universe::heap()->is_in_reserved((address)d64), "should be real oop");
   577     assert(oopDesc::is_oop(cast_to_oop(d64)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d64))),
   577     assert(oopDesc::is_oop(cast_to_oop(d64)), "cannot embed broken oops in code");
   578            "cannot embed scavengable oops in code");
       
   579   }
   578   }
   580 #endif
   579 #endif
   581   cbuf.relocate(cbuf.insts_mark(), rspec, format);
   580   cbuf.relocate(cbuf.insts_mark(), rspec, format);
   582   cbuf.insts()->emit_int64(d64);
   581   cbuf.insts()->emit_int64(d64);
   583 }
   582 }