< prev index next >

src/cpu/aarch64/vm/compiledIC_aarch64.cpp

Print this page




  34 
  35 // Release the CompiledICHolder* associated with this call site is there is one.
  36 void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
  37   // This call site might have become stale so inspect it carefully.
  38   NativeCall* call = nativeCall_at(call_site->addr());
  39   if (is_icholder_entry(call->destination())) {
  40     NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
  41     InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
  42   }
  43 }
  44 
  45 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
  46   // This call site might have become stale so inspect it carefully.
  47   NativeCall* call = nativeCall_at(call_site->addr());
  48   return is_icholder_entry(call->destination());
  49 }
  50 
  51 // ----------------------------------------------------------------------------
  52 
  53 #define __ _masm.
  54 address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {
  55   // Stub is fixed up when the corresponding call is converted from
  56   // calling compiled code to calling interpreted code.
  57   // mov rmethod, 0
  58   // jmp -4 # to self
  59 
  60   address mark = cbuf.insts_mark();  // Get mark within main instrs section.


  61 
  62   // Note that the code buffer's insts_mark is always relative to insts.
  63   // That's why we must use the macroassembler to generate a stub.
  64   MacroAssembler _masm(&cbuf);
  65 
  66   address base = __ start_a_stub(to_interp_stub_size());
  67   int offset = __ offset();
  68   if (base == NULL) {
  69     return NULL;  // CodeBuffer::expand failed
  70   }
  71   // static stub relocation stores the instruction address of the call
  72   __ relocate(static_stub_Relocation::spec(mark));
  73   // static stub relocation also tags the Method* in the code-stream.
  74   __ mov_metadata(rmethod, (Metadata*)NULL);
  75   __ movptr(rscratch1, 0);
  76   __ br(rscratch1);
  77 
  78   assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big");
  79   __ end_a_stub();
  80   return base;




  34 
  35 // Release the CompiledICHolder* associated with this call site is there is one.
  36 void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
  37   // This call site might have become stale so inspect it carefully.
  38   NativeCall* call = nativeCall_at(call_site->addr());
  39   if (is_icholder_entry(call->destination())) {
  40     NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
  41     InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
  42   }
  43 }
  44 
  45 bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
  46   // This call site might have become stale so inspect it carefully.
  47   NativeCall* call = nativeCall_at(call_site->addr());
  48   return is_icholder_entry(call->destination());
  49 }
  50 
  51 // ----------------------------------------------------------------------------
  52 
  53 #define __ _masm.
  54 address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
  55   // Stub is fixed up when the corresponding call is converted from
  56   // calling compiled code to calling interpreted code.
  57   // mov rmethod, 0
  58   // jmp -4 # to self
  59 
  60   if (mark == NULL) {
  61     mark = cbuf.insts_mark();  // Get mark within main instrs section.
  62   }
  63 
  64   // Note that the code buffer's insts_mark is always relative to insts.
  65   // That's why we must use the macroassembler to generate a stub.
  66   MacroAssembler _masm(&cbuf);
  67 
  68   address base = __ start_a_stub(to_interp_stub_size());
  69   int offset = __ offset();
  70   if (base == NULL) {
  71     return NULL;  // CodeBuffer::expand failed
  72   }
  73   // static stub relocation stores the instruction address of the call
  74   __ relocate(static_stub_Relocation::spec(mark));
  75   // static stub relocation also tags the Method* in the code-stream.
  76   __ mov_metadata(rmethod, (Metadata*)NULL);
  77   __ movptr(rscratch1, 0);
  78   __ br(rscratch1);
  79 
  80   assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big");
  81   __ end_a_stub();
  82   return base;


< prev index next >