1 /*
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
253 if (caller->is_interpreted_frame()) {
254 tty->print("interpreted ");
255 }
256 tty->print_cr("caller fp=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, p2i(caller->fp()), p2i(caller->sp()));
257 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(caller->sp()), p2i(caller->sp() + 16));
258 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(caller->fp()), p2i(caller->fp() + 16));
259 tty->print_cr("interpreter fp=" INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(interpreter_frame->fp()), p2i(interpreter_frame->sp()));
260 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(interpreter_frame->sp()), p2i(interpreter_frame->sp() + 16));
261 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(interpreter_frame->fp()), p2i(interpreter_frame->fp() + 16));
262 tty->print_cr("Llocals = " INTPTR_FORMAT, p2i(locals));
263 tty->print_cr("Lesp = " INTPTR_FORMAT, p2i(esp));
264 tty->print_cr("Lmonitors = " INTPTR_FORMAT, p2i(monitors));
265 }
266
267 if (method->max_locals() > 0) {
268 assert(locals < caller->sp() || locals >= (caller->sp() + 16), "locals in save area");
269 assert(locals < caller->fp() || locals > (caller->fp() + 16), "locals in save area");
270 assert(locals < interpreter_frame->sp() || locals > (interpreter_frame->sp() + 16), "locals in save area");
271 assert(locals < interpreter_frame->fp() || locals >= (interpreter_frame->fp() + 16), "locals in save area");
272 }
273 #ifdef _LP64
274 assert(*interpreter_frame->register_addr(I5_savedSP) & 1, "must be odd");
275 #endif
276
277 *interpreter_frame->register_addr(Lmethod) = (intptr_t) method;
278 *interpreter_frame->register_addr(Llocals) = (intptr_t) locals;
279 *interpreter_frame->register_addr(Lmonitors) = (intptr_t) monitors;
280 *interpreter_frame->register_addr(Lesp) = (intptr_t) esp;
281 // Llast_SP will be same as SP as there is no adapter space
282 *interpreter_frame->register_addr(Llast_SP) = (intptr_t) interpreter_frame->sp() - STACK_BIAS;
283 *interpreter_frame->register_addr(LcpoolCache) = (intptr_t) method->constants()->cache();
284 // save the mirror in the interpreter frame
285 *interpreter_frame->interpreter_frame_mirror_addr() = method->method_holder()->java_mirror();
286 #ifdef FAST_DISPATCH
287 *interpreter_frame->register_addr(IdispatchTables) = (intptr_t) Interpreter::dispatch_table();
288 #endif
289
290 #ifdef ASSERT
291 BasicObjectLock* mp = (BasicObjectLock*)monitors;
292
293 assert(interpreter_frame->interpreter_frame_method() == method, "method matches");
294 assert(interpreter_frame->interpreter_frame_local_at(9) == (intptr_t *)((intptr_t)locals - (9 * Interpreter::stackElementSize)), "locals match");
295 assert(interpreter_frame->interpreter_frame_monitor_end() == mp, "monitor_end matches");
|
1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
253 if (caller->is_interpreted_frame()) {
254 tty->print("interpreted ");
255 }
256 tty->print_cr("caller fp=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, p2i(caller->fp()), p2i(caller->sp()));
257 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(caller->sp()), p2i(caller->sp() + 16));
258 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(caller->fp()), p2i(caller->fp() + 16));
259 tty->print_cr("interpreter fp=" INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(interpreter_frame->fp()), p2i(interpreter_frame->sp()));
260 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(interpreter_frame->sp()), p2i(interpreter_frame->sp() + 16));
261 tty->print_cr("save area = " INTPTR_FORMAT ", " INTPTR_FORMAT, p2i(interpreter_frame->fp()), p2i(interpreter_frame->fp() + 16));
262 tty->print_cr("Llocals = " INTPTR_FORMAT, p2i(locals));
263 tty->print_cr("Lesp = " INTPTR_FORMAT, p2i(esp));
264 tty->print_cr("Lmonitors = " INTPTR_FORMAT, p2i(monitors));
265 }
266
267 if (method->max_locals() > 0) {
268 assert(locals < caller->sp() || locals >= (caller->sp() + 16), "locals in save area");
269 assert(locals < caller->fp() || locals > (caller->fp() + 16), "locals in save area");
270 assert(locals < interpreter_frame->sp() || locals > (interpreter_frame->sp() + 16), "locals in save area");
271 assert(locals < interpreter_frame->fp() || locals >= (interpreter_frame->fp() + 16), "locals in save area");
272 }
273 assert(*interpreter_frame->register_addr(I5_savedSP) & 1, "must be odd");
274
275 *interpreter_frame->register_addr(Lmethod) = (intptr_t) method;
276 *interpreter_frame->register_addr(Llocals) = (intptr_t) locals;
277 *interpreter_frame->register_addr(Lmonitors) = (intptr_t) monitors;
278 *interpreter_frame->register_addr(Lesp) = (intptr_t) esp;
279 // Llast_SP will be same as SP as there is no adapter space
280 *interpreter_frame->register_addr(Llast_SP) = (intptr_t) interpreter_frame->sp() - STACK_BIAS;
281 *interpreter_frame->register_addr(LcpoolCache) = (intptr_t) method->constants()->cache();
282 // save the mirror in the interpreter frame
283 *interpreter_frame->interpreter_frame_mirror_addr() = method->method_holder()->java_mirror();
284 #ifdef FAST_DISPATCH
285 *interpreter_frame->register_addr(IdispatchTables) = (intptr_t) Interpreter::dispatch_table();
286 #endif
287
288 #ifdef ASSERT
289 BasicObjectLock* mp = (BasicObjectLock*)monitors;
290
291 assert(interpreter_frame->interpreter_frame_method() == method, "method matches");
292 assert(interpreter_frame->interpreter_frame_local_at(9) == (intptr_t *)((intptr_t)locals - (9 * Interpreter::stackElementSize)), "locals match");
293 assert(interpreter_frame->interpreter_frame_monitor_end() == mp, "monitor_end matches");
|