< prev index next >

src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp

Print this page
rev 9227 : 8143067: aarch64: guarantee failure in javac
Summary: Fix adrp going out of range during code relocation
Reviewed-by: duke

@@ -525,11 +525,11 @@
   __ leave();
   __ br(rscratch1);
   address polling_page(os::get_polling_page());
   assert(os::is_poll_address(polling_page), "should be");
   unsigned long off;
-  __ adrp(rscratch1, Address(polling_page, rtype), off);
+  __ far_adrp(rscratch1, Address(polling_page, rtype), off);
   __ bind(poll);
   if (info)
     add_debug_info_for_branch(info);  // This isn't just debug info:
                                       // it's the oop map
   else

@@ -550,11 +550,11 @@
 int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
   address polling_page(os::get_polling_page());
   guarantee(info != NULL, "Shouldn't be NULL");
   assert(os::is_poll_address(polling_page), "should be");
   unsigned long off;
-  __ adrp(rscratch1, Address(polling_page, relocInfo::poll_type), off);
+  __ far_adrp(rscratch1, Address(polling_page, relocInfo::poll_type), off);
   assert(off == 0, "must be");
   add_debug_info_for_branch(info);  // This isn't just debug info:
   // it's the oop map
   __ read_polling_page(rscratch1, relocInfo::poll_type);
   return __ offset();

@@ -2637,11 +2637,11 @@
   Register val = op->val()->as_register();
   Register res = op->result_opr()->as_register();
 
   assert_different_registers(val, crc, res);
   unsigned long offset;
-  __ adrp(res, ExternalAddress(StubRoutines::crc_table_addr()), offset);
+  __ far_adrp(res, ExternalAddress(StubRoutines::crc_table_addr()), offset);
   if (offset) __ add(res, res, offset);
 
   __ ornw(crc, zr, crc); // ~crc
   __ update_byte_crc32(crc, val, res);
   __ ornw(res, zr, crc); // ~crc
< prev index next >