157 }
158
159
160 address TemplateInterpreterGenerator::generate_continuation_for(TosState state) {
161 address entry = __ pc();
162 // NULL last_sp until next java call
163 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
164 __ dispatch_next(state);
165 return entry;
166 }
167
168
169 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) {
170 address entry = __ pc();
171
172 // Restore stack bottom in case i2c adjusted stack
173 __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
174 // and NULL it as marker that esp is now tos until next java call
175 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
176
177 __ restore_bcp();
178 __ restore_locals();
179
180 Label L_got_cache, L_giant_index;
181 if (EnableInvokeDynamic) {
182 __ cmpb(Address(r13, 0), Bytecodes::_invokedynamic);
183 __ jcc(Assembler::equal, L_giant_index);
184 }
185 __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u2));
186 __ bind(L_got_cache);
187 __ movl(rbx, Address(rbx, rcx,
188 Address::times_ptr,
189 in_bytes(ConstantPoolCache::base_offset()) +
190 3 * wordSize));
191 __ andl(rbx, 0xFF);
192 __ lea(rsp, Address(rsp, rbx, Address::times_8));
193 __ dispatch_next(state, step);
194
195 // out of the main line of code...
196 if (EnableInvokeDynamic) {
|
157 }
158
159
160 address TemplateInterpreterGenerator::generate_continuation_for(TosState state) {
161 address entry = __ pc();
162 // NULL last_sp until next java call
163 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
164 __ dispatch_next(state);
165 return entry;
166 }
167
168
169 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) {
170 address entry = __ pc();
171
172 // Restore stack bottom in case i2c adjusted stack
173 __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
174 // and NULL it as marker that esp is now tos until next java call
175 __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
176
177 if (state == atos) {
178 Register mdp = r13;
179 Register tmp = r14;
180 __ profile_return_type(mdp, rax, tmp);
181 }
182
183 __ restore_bcp();
184 __ restore_locals();
185
186 Label L_got_cache, L_giant_index;
187 if (EnableInvokeDynamic) {
188 __ cmpb(Address(r13, 0), Bytecodes::_invokedynamic);
189 __ jcc(Assembler::equal, L_giant_index);
190 }
191 __ get_cache_and_index_at_bcp(rbx, rcx, 1, sizeof(u2));
192 __ bind(L_got_cache);
193 __ movl(rbx, Address(rbx, rcx,
194 Address::times_ptr,
195 in_bytes(ConstantPoolCache::base_offset()) +
196 3 * wordSize));
197 __ andl(rbx, 0xFF);
198 __ lea(rsp, Address(rsp, rbx, Address::times_8));
199 __ dispatch_next(state, step);
200
201 // out of the main line of code...
202 if (EnableInvokeDynamic) {
|