349 // emit 32 bit value and construct relocation entry from RelocationHolder |
349 // emit 32 bit value and construct relocation entry from RelocationHolder |
350 void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec, |
350 void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec, |
351 int format) { |
351 int format) { |
352 #ifdef ASSERT |
352 #ifdef ASSERT |
353 if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) { |
353 if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) { |
354 assert(oop(d32)->is_oop() && (ScavengeRootsInCode || !oop(d32)->is_scavengable()), "cannot embed scavengable oops in code"); |
354 assert(cast_to_oop(d32)->is_oop() && (ScavengeRootsInCode || !cast_to_oop(d32)->is_scavengable()), "cannot embed scavengable oops in code"); |
355 } |
355 } |
356 #endif |
356 #endif |
357 cbuf.relocate(cbuf.insts_mark(), rspec, format); |
357 cbuf.relocate(cbuf.insts_mark(), rspec, format); |
358 cbuf.insts()->emit_int32(d32); |
358 cbuf.insts()->emit_int32(d32); |
359 } |
359 } |