< prev index next >

src/hotspot/cpu/aarch64/c1_CodeStubs_aarch64.cpp

Print this page
*** 251,10 ***
--- 251,24 ---
    }
    __ adr(lr, _continuation);
    __ far_jump(RuntimeAddress(Runtime1::entry_for(exit_id)));
  }
  
+ void LoadKlassStub::emit_code(LIR_Assembler* ce) {
+   __ bind(_entry);
+   Register res = _result->as_register();
+   ce->store_parameter(_obj->as_register(), 0);
+   if (res != r0) {
+     __ push(RegSet::of(r0), sp);
+   }
+   __ far_jump(RuntimeAddress(Runtime1::entry_for(Runtime1::load_klass_id)));
+   if (res != r0) {
+     __ mov(res, r0);
+     __ pop(RegSet::of(r0), sp);
+   }
+   __ b(_continuation);
+ }
  
  // Implementation of patching:
  // - Copy the code at given offset to an inlined buffer (first the bytes, then the number of bytes)
  // - Replace original code with a call to the stub
  // At Runtime:
< prev index next >