121
122 int CompiledStaticCall::to_aot_stub_size() {
123 if (UseAOT) {
124 return NOT_LP64(7) // movl; jmp
125 LP64_ONLY(12); // movq (1+1+8); jmp (2)
126 } else {
127 return 0;
128 }
129 }
130
131 // Relocation entries for call stub, compiled java to aot.
132 int CompiledStaticCall::reloc_to_aot_stub() {
133 if (UseAOT) {
134 return 2; // 1 in emit_to_aot_stub + 1 in emit_call
135 } else {
136 return 0;
137 }
138 }
139 #endif // INCLUDE_AOT
140
141 void CompiledDirectStaticCall::set_to_interpreted(methodHandle callee, address entry) {
142 address stub = find_stub(false /* is_aot */);
143 guarantee(stub != NULL, "stub not found");
144
145 if (TraceICs) {
146 ResourceMark rm;
147 tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
148 p2i(instruction_address()),
149 callee->name_and_sig_as_C_string());
150 }
151
152 // Creation also verifies the object.
153 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
154 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
155
156 #ifdef ASSERT
157 // read the value once
158 intptr_t data = method_holder->data();
159 address destination = jump->jump_destination();
160 assert(data == 0 || data == (intptr_t)callee(),
161 "a) MT-unsafe modification of inline cache");
|
121
122 int CompiledStaticCall::to_aot_stub_size() {
123 if (UseAOT) {
124 return NOT_LP64(7) // movl; jmp
125 LP64_ONLY(12); // movq (1+1+8); jmp (2)
126 } else {
127 return 0;
128 }
129 }
130
131 // Relocation entries for call stub, compiled java to aot.
132 int CompiledStaticCall::reloc_to_aot_stub() {
133 if (UseAOT) {
134 return 2; // 1 in emit_to_aot_stub + 1 in emit_call
135 } else {
136 return 0;
137 }
138 }
139 #endif // INCLUDE_AOT
140
141 void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, address entry) {
142 address stub = find_stub(false /* is_aot */);
143 guarantee(stub != NULL, "stub not found");
144
145 if (TraceICs) {
146 ResourceMark rm;
147 tty->print_cr("CompiledDirectStaticCall@" INTPTR_FORMAT ": set_to_interpreted %s",
148 p2i(instruction_address()),
149 callee->name_and_sig_as_C_string());
150 }
151
152 // Creation also verifies the object.
153 NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
154 NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
155
156 #ifdef ASSERT
157 // read the value once
158 intptr_t data = method_holder->data();
159 address destination = jump->jump_destination();
160 assert(data == 0 || data == (intptr_t)callee(),
161 "a) MT-unsafe modification of inline cache");
|