comparison src/cpu/x86/vm/templateInterpreter_x86_32.cpp @ 2245:638119ce7cfd

7009309: JSR 292: compiler/6991596/Test6991596.java crashes on fastdebug JDK7/b122 Reviewed-by: kvn, never
author twisti
date Tue, 01 Feb 2011 03:38:44 -0800
parents b599a4c6c2df
children 38fea01eb669 e1162778c1c8
comparison
equal deleted inserted replaced
2244:4f26f535a225 2245:638119ce7cfd
175 } 175 }
176 176
177 177
178 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) { 178 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step) {
179 TosState incoming_state = state; 179 TosState incoming_state = state;
180 180 address entry = __ pc();
181 Label interpreter_entry;
182 address compiled_entry = __ pc();
183 181
184 #ifdef COMPILER2 182 #ifdef COMPILER2
185 // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases 183 // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases
186 if ((incoming_state == ftos && UseSSE < 1) || (incoming_state == dtos && UseSSE < 2)) { 184 if ((incoming_state == ftos && UseSSE < 1) || (incoming_state == dtos && UseSSE < 2)) {
187 for (int i = 1; i < 8; i++) { 185 for (int i = 1; i < 8; i++) {
194 if ((incoming_state == ftos && UseSSE < 1) || (incoming_state == dtos && UseSSE < 2)) { 192 if ((incoming_state == ftos && UseSSE < 1) || (incoming_state == dtos && UseSSE < 2)) {
195 __ MacroAssembler::verify_FPU(1, "generate_return_entry_for compiled"); 193 __ MacroAssembler::verify_FPU(1, "generate_return_entry_for compiled");
196 } else { 194 } else {
197 __ MacroAssembler::verify_FPU(0, "generate_return_entry_for compiled"); 195 __ MacroAssembler::verify_FPU(0, "generate_return_entry_for compiled");
198 } 196 }
199
200 __ jmp(interpreter_entry, relocInfo::none);
201 // emit a sentinel we can test for when converting an interpreter
202 // entry point to a compiled entry point.
203 __ a_long(Interpreter::return_sentinel);
204 __ a_long((int)compiled_entry);
205 address entry = __ pc();
206 __ bind(interpreter_entry);
207 197
208 // In SSE mode, interpreter returns FP results in xmm0 but they need 198 // In SSE mode, interpreter returns FP results in xmm0 but they need
209 // to end up back on the FPU so it can operate on them. 199 // to end up back on the FPU so it can operate on them.
210 if (incoming_state == ftos && UseSSE >= 1) { 200 if (incoming_state == ftos && UseSSE >= 1) {
211 __ subptr(rsp, wordSize); 201 __ subptr(rsp, wordSize);