< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Print this page

        

@@ -738,25 +738,25 @@
          || entry.rspec().type() == relocInfo::opt_virtual_call_type
          || entry.rspec().type() == relocInfo::static_call_type
          || entry.rspec().type() == relocInfo::virtual_call_type, "wrong reloc type");
 
   unsigned int start_offset = offset();
-  if (far_branches() && !Compile::current()->in_scratch_emit_size()) {
+  if (UseAOT || (far_branches() && !Compile::current()->in_scratch_emit_size())) {
     address stub = emit_trampoline_stub(start_offset, entry.target());
     if (stub == NULL) {
       return NULL; // CodeCache is full
     }
   }
 
   if (cbuf) cbuf->set_insts_mark();
   relocate(entry.rspec());
-  if (!far_branches()) {
-    bl(entry.target());
-  } else {
+  if (UseAOT || far_branches()) {
     bl(pc());
+  } else {
+    bl(entry.target());
   }
-  // just need to return a non-null address
+
   return pc();
 }
 
 
 // Emit a trampoline stub for a call to a target which is too far away.

@@ -1048,11 +1048,11 @@
                                Address::lsl(LogBytesPerWord)));
     ldr(method_result, Address(method_result, vtable_offset_in_bytes));
   } else {
     vtable_offset_in_bytes += vtable_index.as_constant() * wordSize;
     ldr(method_result,
-        form_address(rscratch1, recv_klass, vtable_offset_in_bytes));
+        form_address(rscratch1, recv_klass, vtable_offset_in_bytes, 0));
   }
 }
 
 void MacroAssembler::check_klass_subtype(Register sub_klass,
                            Register super_klass,
< prev index next >