src/cpu/mips/vm/runtime_mips_64.cpp

changeset 9228
617b86d17edb
parent 9171
c67c94f5b85d
child 9251
1ccc5a3b3671
equal deleted inserted replaced
9227:f1560009a081 9228:617b86d17edb
63 // A1: exception pc in caller or ??? 63 // A1: exception pc in caller or ???
64 // jumps to: exception handler of caller 64 // jumps to: exception handler of caller
65 // 65 //
66 // Note: the exception pc MUST be at a call (precise debug information) 66 // Note: the exception pc MUST be at a call (precise debug information)
67 // 67 //
68 // 2012/9/14 Jin: [stubGenerator_mips.cpp] generate_forward_exception() 68 // [stubGenerator_mips.cpp] generate_forward_exception()
69 // |- V0, V1 are created 69 // |- V0, V1 are created
70 // |- T9 <= SharedRuntime::exception_handler_for_return_address 70 // |- T9 <= SharedRuntime::exception_handler_for_return_address
71 // `- jr T9 71 // `- jr T9
72 // `- the caller's exception_handler 72 // `- the caller's exception_handler
73 // `- jr OptoRuntime::exception_blob 73 // `- jr OptoRuntime::exception_blob
74 // `- here 74 // `- here
75 // 75 //
76 void OptoRuntime::generate_exception_blob() { 76 void OptoRuntime::generate_exception_blob() {
77 // Capture info about frame layout 77 // Capture info about frame layout
78 enum layout { 78 enum layout {
79 fp_off, 79 fp_off,
90 90
91 address start = __ pc(); 91 address start = __ pc();
92 92
93 __ daddiu(SP, SP, -1 * framesize * wordSize); // Prolog! 93 __ daddiu(SP, SP, -1 * framesize * wordSize); // Prolog!
94 94
95 /* 2012/9.27 Jin: this frame will be treated as the original caller method. 95 // this frame will be treated as the original caller method.
96 * So, the return pc should be filled with the original exception pc. 96 // So, the return pc should be filled with the original exception pc.
97 * ref: X86's implementation 97 // ref: X86's implementation
98 */
99 __ sd(V1, SP, return_off *wordSize); // return address 98 __ sd(V1, SP, return_off *wordSize); // return address
100 __ sd(FP, SP, fp_off *wordSize); // EBP 99 __ sd(FP, SP, fp_off *wordSize); // EBP
101 100
102 // Save callee saved registers. None for UseSSE=0, 101 // Save callee saved registers. None for UseSSE=0,
103 // floats-only for UseSSE=1, and doubles for UseSSE=2. 102 // floats-only for UseSSE=1, and doubles for UseSSE=2.
170 __ sd(R0, Address(thread, JavaThread::exception_pc_offset())); 169 __ sd(R0, Address(thread, JavaThread::exception_pc_offset()));
171 #endif 170 #endif
172 // Clear the exception oop so GC no longer processes it as a root. 171 // Clear the exception oop so GC no longer processes it as a root.
173 __ sd(R0, Address(thread, JavaThread::exception_oop_offset())); 172 __ sd(R0, Address(thread, JavaThread::exception_oop_offset()));
174 173
175 /* 2014/5/12 Jin: Fix seg fault when running: 174 // Fix seg fault when running:
176 * Eclipse + Plugin + Debug As 175 // Eclipse + Plugin + Debug As
177 * This is the only condition where C2 calls SharedRuntime::generate_deopt_blob() 176 // This is the only condition where C2 calls SharedRuntime::generate_deopt_blob()
178 * 177 //
179 * Ref: http://10.2.5.21:8000/projects/java/wiki/Jgj-log-2014-5-12_ 178 // Ref: http://10.2.5.21:8000/projects/java/wiki/Jgj-log-2014-5-12_
180 */ 179 //
181 __ move(V0, A0); 180 __ move(V0, A0);
182 __ move(V1, A1); 181 __ move(V1, A1);
183 182
184 // rax,: exception oop 183 // rax,: exception oop
185 // rcx: exception handler 184 // rcx: exception handler

mercurial