equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright 2012, 2014 SAP AG. All rights reserved. |
3 * Copyright 2012, 2015 SAP AG. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
8 * published by the Free Software Foundation. |
8 * published by the Free Software Foundation. |
502 |
502 |
503 // Current C frame |
503 // Current C frame |
504 frame cur_frame = os::current_frame(); |
504 frame cur_frame = os::current_frame(); |
505 |
505 |
506 // Robust search of trace_calling_frame (independant of inlining). |
506 // Robust search of trace_calling_frame (independant of inlining). |
507 // Assumes saved_regs comes from a pusha in the trace_calling_frame. |
507 assert(cur_frame.sp() <= saved_regs, "registers not saved on stack ?"); |
508 assert(cur_frame.sp() < saved_regs, "registers not saved on stack ?"); |
|
509 frame trace_calling_frame = os::get_sender_for_C_frame(&cur_frame); |
508 frame trace_calling_frame = os::get_sender_for_C_frame(&cur_frame); |
510 while (trace_calling_frame.fp() < saved_regs) { |
509 while (trace_calling_frame.fp() < saved_regs) { |
511 trace_calling_frame = os::get_sender_for_C_frame(&trace_calling_frame); |
510 trace_calling_frame = os::get_sender_for_C_frame(&trace_calling_frame); |
512 } |
511 } |
513 |
512 |
537 if (!TraceMethodHandles) return; |
536 if (!TraceMethodHandles) return; |
538 |
537 |
539 BLOCK_COMMENT("trace_method_handle {"); |
538 BLOCK_COMMENT("trace_method_handle {"); |
540 |
539 |
541 const Register tmp = R11; // Will be preserved. |
540 const Register tmp = R11; // Will be preserved. |
542 const int nbytes_save = 11*8; // volatile gprs except R0 |
541 const int nbytes_save = MacroAssembler::num_volatile_regs * 8; |
543 __ save_volatile_gprs(R1_SP, -nbytes_save); // except R0 |
542 __ save_volatile_gprs(R1_SP, -nbytes_save); // except R0 |
544 __ save_LR_CR(tmp); // save in old frame |
543 __ save_LR_CR(tmp); // save in old frame |
545 |
544 |
546 __ mr(R5_ARG3, R1_SP); // saved_sp |
545 __ mr(R5_ARG3, R1_SP); // saved_sp |
547 __ push_frame_reg_args(nbytes_save, tmp); |
546 __ push_frame_reg_args(nbytes_save, tmp); |