src/cpu/aarch64/vm/compiledIC_aarch64.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/cpu/aarch64/vm

src/cpu/aarch64/vm/compiledIC_aarch64.cpp

Print this page
rev 29185 : Review changes


  59   // static stub relocation also tags the Method* in the code-stream.
  60   __ mov_metadata(rmethod, (Metadata*)NULL);
  61   __ movptr(rscratch1, 0);
  62   __ br(rscratch1);
  63 
  64   assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big");
  65   __ end_a_stub();
  66   return base;
  67 }
  68 #undef __
  69 
  70 int CompiledStaticCall::to_interp_stub_size() {
  71   return 7 * NativeInstruction::instruction_size;
  72 }
  73 
  74 // Relocation entries for call stub, compiled java to interpreter.
  75 int CompiledStaticCall::reloc_to_interp_stub() {
  76   return 4; // 3 in emit_to_interp_stub + 1 in emit_call
  77 }
  78 
  79 void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) {
  80   address stub = find_stub(false /* is_aot */);
  81   guarantee(stub != NULL, "stub not found");
  82 
  83   if (TraceICs) {
  84     ResourceMark rm;
  85     tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
  86                   p2i(instruction_address()),
  87                   callee->name_and_sig_as_C_string());
  88   }
  89 
  90   // Creation also verifies the object.
  91   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
  92 #ifndef PRODUCT
  93   NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address());
  94 
  95   // read the value once
  96   volatile intptr_t data = method_holder->data();
  97   assert(data == 0 || data == (intptr_t)callee(),
  98          "a) MT-unsafe modification of inline cache");
  99   assert(data == 0 || jump->jump_destination() == entry,




  59   // static stub relocation also tags the Method* in the code-stream.
  60   __ mov_metadata(rmethod, (Metadata*)NULL);
  61   __ movptr(rscratch1, 0);
  62   __ br(rscratch1);
  63 
  64   assert((__ offset() - offset) <= (int)to_interp_stub_size(), "stub too big");
  65   __ end_a_stub();
  66   return base;
  67 }
  68 #undef __
  69 
  70 int CompiledStaticCall::to_interp_stub_size() {
  71   return 7 * NativeInstruction::instruction_size;
  72 }
  73 
  74 // Relocation entries for call stub, compiled java to interpreter.
  75 int CompiledStaticCall::reloc_to_interp_stub() {
  76   return 4; // 3 in emit_to_interp_stub + 1 in emit_call
  77 }
  78 
  79 void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) {
  80   address stub = find_stub(false /* is_aot */);
  81   guarantee(stub != NULL, "stub not found");
  82 
  83   if (TraceICs) {
  84     ResourceMark rm;
  85     tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
  86                   p2i(instruction_address()),
  87                   callee->name_and_sig_as_C_string());
  88   }
  89 
  90   // Creation also verifies the object.
  91   NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
  92 #ifndef PRODUCT
  93   NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address());
  94 
  95   // read the value once
  96   volatile intptr_t data = method_holder->data();
  97   assert(data == 0 || data == (intptr_t)callee(),
  98          "a) MT-unsafe modification of inline cache");
  99   assert(data == 0 || jump->jump_destination() == entry,


src/cpu/aarch64/vm/compiledIC_aarch64.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File