annotate src/cpu/ppc/vm/runtime_ppc.cpp @ 14726:92aa6797d639

Backed out merge changeset: b51e29501f30 Backed out merge revision to its first parent (8f483e200405)
author Doug Simon <doug.simon@oracle.com>
date Mon, 24 Mar 2014 21:30:43 +0100
parents e5e8aa897002
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14445
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
1 /*
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
3 * Copyright 2012, 2013 SAP AG. All rights reserved.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
5 *
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
6 * This code is free software; you can redistribute it and/or modify it
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
7 * under the terms of the GNU General Public License version 2 only, as
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
8 * published by the Free Software Foundation.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
9 *
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
10 * This code is distributed in the hope that it will be useful, but WITHOUT
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
13 * version 2 for more details (a copy is included in the LICENSE file that
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
14 * accompanied this code).
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
15 *
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License version
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
17 * 2 along with this work; if not, write to the Free Software Foundation,
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
19 *
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
21 * or visit www.oracle.com if you need additional information or have any
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
22 * questions.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
23 *
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
24 */
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
25
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
26 #include "precompiled.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
27 #ifdef COMPILER2
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
28 #include "asm/assembler.inline.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
29 #include "asm/macroAssembler.inline.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
30 #include "classfile/systemDictionary.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
31 #include "code/vmreg.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
32 #include "interpreter/interpreter.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
33 #include "nativeInst_ppc.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
34 #include "opto/runtime.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
35 #include "runtime/interfaceSupport.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
36 #include "runtime/sharedRuntime.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
37 #include "runtime/stubRoutines.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
38 #include "runtime/vframeArray.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
39 #include "utilities/globalDefinitions.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
40 #include "vmreg_ppc.inline.hpp"
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
41 #endif
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
42
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
43 #define __ masm->
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
44
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
45
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
46 #ifdef COMPILER2
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
47
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
48 // SP adjustment (must use unextended SP) for method handle call sites
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
49 // during exception handling.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
50 static intptr_t adjust_SP_for_methodhandle_callsite(JavaThread *thread) {
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
51 RegisterMap map(thread, false);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
52 // The frame constructor will do the correction for us (see frame::adjust_unextended_SP).
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
53 frame mh_caller_frame = thread->last_frame().sender(&map);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
54 assert(mh_caller_frame.is_compiled_frame(), "Only may reach here for compiled MH call sites");
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
55 return (intptr_t) mh_caller_frame.unextended_sp();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
56 }
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
57
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
58 //------------------------------generate_exception_blob---------------------------
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
59 // Creates exception blob at the end.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
60 // Using exception blob, this code is jumped from a compiled method.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
61 //
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
62 // Given an exception pc at a call we call into the runtime for the
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
63 // handler in this method. This handler might merely restore state
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
64 // (i.e. callee save registers) unwind the frame and jump to the
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
65 // exception handler for the nmethod if there is no Java level handler
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
66 // for the nmethod.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
67 //
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
68 // This code is entered with a jmp.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
69 //
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
70 // Arguments:
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
71 // R3_ARG1: exception oop
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
72 // R4_ARG2: exception pc
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
73 //
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
74 // Results:
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
75 // R3_ARG1: exception oop
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
76 // R4_ARG2: exception pc in caller
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
77 // destination: exception handler of caller
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
78 //
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
79 // Note: the exception pc MUST be at a call (precise debug information)
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
80 //
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
81 void OptoRuntime::generate_exception_blob() {
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
82 // Allocate space for the code.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
83 ResourceMark rm;
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
84 // Setup code generation tools.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
85 CodeBuffer buffer("exception_blob", 2048, 1024);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
86 InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
87
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
88 address start = __ pc();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
89
14726
92aa6797d639 Backed out merge changeset: b51e29501f30
Doug Simon <doug.simon@oracle.com>
parents: 14684
diff changeset
90 int frame_size_in_bytes = frame::abi_112_size;
14445
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
91 OopMap* map = new OopMap(frame_size_in_bytes / sizeof(jint), 0);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
92
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
93 // Exception pc is 'return address' for stack walker.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
94 __ std(R4_ARG2/*exception pc*/, _abi(lr), R1_SP);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
95
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
96 // Store the exception in the Thread object.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
97 __ std(R3_ARG1/*exception oop*/, in_bytes(JavaThread::exception_oop_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
98 __ std(R4_ARG2/*exception pc*/, in_bytes(JavaThread::exception_pc_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
99
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
100 // Save callee-saved registers.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
101 // Push a C frame for the exception blob. It is needed for the C call later on.
14726
92aa6797d639 Backed out merge changeset: b51e29501f30
Doug Simon <doug.simon@oracle.com>
parents: 14684
diff changeset
102 __ push_frame_abi112(0, R11_scratch1);
14445
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
103
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
104 // This call does all the hard work. It checks if an exception handler
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
105 // exists in the method.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
106 // If so, it returns the handler address.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
107 // If not, it prepares for stack-unwinding, restoring the callee-save
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
108 // registers of the frame being removed.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
109 __ set_last_Java_frame(/*sp=*/R1_SP, noreg);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
110
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
111 __ mr(R3_ARG1, R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
112 __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, OptoRuntime::handle_exception_C),
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
113 relocInfo::none);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
114 address calls_return_pc = __ last_calls_return_pc();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
115 # ifdef ASSERT
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
116 __ cmpdi(CCR0, R3_RET, 0);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
117 __ asm_assert_ne("handle_exception_C must not return NULL", 0x601);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
118 # endif
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
119
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
120 // Set an oopmap for the call site. This oopmap will only be used if we
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
121 // are unwinding the stack. Hence, all locations will be dead.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
122 // Callee-saved registers will be the same as the frame above (i.e.,
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
123 // handle_exception_stub), since they were restored when we got the
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
124 // exception.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
125 OopMapSet* oop_maps = new OopMapSet();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
126 oop_maps->add_gc_map(calls_return_pc - start, map);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
127
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
128 // Get unextended_sp for method handle call sites.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
129 Label mh_callsite, mh_done; // Use a 2nd c call if it's a method handle call site.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
130 __ lwa(R4_ARG2, in_bytes(JavaThread::is_method_handle_return_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
131 __ cmpwi(CCR0, R4_ARG2, 0);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
132 __ bne(CCR0, mh_callsite);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
133
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
134 __ mtctr(R3_RET); // Move address of exception handler to SR_CTR.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
135 __ reset_last_Java_frame();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
136 __ pop_frame();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
137
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
138 __ bind(mh_done);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
139 // We have a handler in register SR_CTR (could be deopt blob).
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
140
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
141 // Get the exception oop.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
142 __ ld(R3_ARG1, in_bytes(JavaThread::exception_oop_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
143
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
144 // Get the exception pc in case we are deoptimized.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
145 __ ld(R4_ARG2, in_bytes(JavaThread::exception_pc_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
146
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
147 // Reset thread values.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
148 __ li(R0, 0);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
149 #ifdef ASSERT
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
150 __ std(R0, in_bytes(JavaThread::exception_handler_pc_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
151 __ std(R0, in_bytes(JavaThread::exception_pc_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
152 #endif
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
153 // Clear the exception oop so GC no longer processes it as a root.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
154 __ std(R0, in_bytes(JavaThread::exception_oop_offset()), R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
155
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
156 // Move exception pc into SR_LR.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
157 __ mtlr(R4_ARG2);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
158 __ bctr();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
159
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
160
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
161 // Same as above, but also set sp to unextended_sp.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
162 __ bind(mh_callsite);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
163 __ mr(R31, R3_RET); // Save branch address.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
164 __ mr(R3_ARG1, R16_thread);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
165 __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, adjust_SP_for_methodhandle_callsite), relocInfo::none);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
166 // Returns unextended_sp in R3_RET.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
167
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
168 __ mtctr(R31); // Move address of exception handler to SR_CTR.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
169 __ reset_last_Java_frame();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
170
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
171 __ mr(R1_SP, R3_RET); // Set sp to unextended_sp.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
172 __ b(mh_done);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
173
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
174
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
175 // Make sure all code is generated.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
176 masm->flush();
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
177
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
178 // Set exception blob.
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
179 _exception_blob = ExceptionBlob::create(&buffer, oop_maps,
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
180 frame_size_in_bytes/wordSize);
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
181 }
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
182
67fa91961822 8029940: PPC64 (part 122): C2 compiler port
goetz
parents:
diff changeset
183 #endif // COMPILER2