| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 | 637 |
| 638 for (int i = 0; i < descriptor->register_param_count_; ++i) { | 638 for (int i = 0; i < descriptor->register_param_count_; ++i) { |
| 639 output_frame_offset -= kPointerSize; | 639 output_frame_offset -= kPointerSize; |
| 640 DoTranslateCommand(iterator, 0, output_frame_offset); | 640 DoTranslateCommand(iterator, 0, output_frame_offset); |
| 641 } | 641 } |
| 642 | 642 |
| 643 value = input_->GetRegister(ebp.code()); | 643 value = input_->GetRegister(ebp.code()); |
| 644 output_frame->SetRegister(ebp.code(), value); | 644 output_frame->SetRegister(ebp.code(), value); |
| 645 output_frame->SetFp(value); | 645 output_frame->SetFp(value); |
| 646 | 646 |
| 647 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { |
| 648 double double_value = input_->GetDoubleRegister(i); |
| 649 output_frame->SetDoubleRegister(i, double_value); |
| 650 } |
| 651 |
| 647 intptr_t handler = | 652 intptr_t handler = |
| 648 reinterpret_cast<intptr_t>(descriptor->deoptimization_handler_); | 653 reinterpret_cast<intptr_t>(descriptor->deoptimization_handler_); |
| 649 output_frame->SetRegister(eax.code(), descriptor->register_param_count_); | 654 output_frame->SetRegister(eax.code(), descriptor->register_param_count_); |
| 650 output_frame->SetRegister(ebx.code(), handler); | 655 output_frame->SetRegister(ebx.code(), handler); |
| 651 } | 656 } |
| 652 | 657 |
| 653 | 658 |
| 654 void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator, | 659 void Deoptimizer::DoComputeConstructStubFrame(TranslationIterator* iterator, |
| 655 int frame_index) { | 660 int frame_index) { |
| 656 Builtins* builtins = isolate_->builtins(); | 661 Builtins* builtins = isolate_->builtins(); |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 __ sub(ecx, Immediate(sizeof(uint32_t))); | 1261 __ sub(ecx, Immediate(sizeof(uint32_t))); |
| 1257 __ push(Operand(ebx, ecx, times_1, FrameDescription::frame_content_offset())); | 1262 __ push(Operand(ebx, ecx, times_1, FrameDescription::frame_content_offset())); |
| 1258 __ bind(&inner_loop_header); | 1263 __ bind(&inner_loop_header); |
| 1259 __ test(ecx, ecx); | 1264 __ test(ecx, ecx); |
| 1260 __ j(not_zero, &inner_push_loop); | 1265 __ j(not_zero, &inner_push_loop); |
| 1261 __ add(eax, Immediate(kPointerSize)); | 1266 __ add(eax, Immediate(kPointerSize)); |
| 1262 __ bind(&outer_loop_header); | 1267 __ bind(&outer_loop_header); |
| 1263 __ cmp(eax, edx); | 1268 __ cmp(eax, edx); |
| 1264 __ j(below, &outer_push_loop); | 1269 __ j(below, &outer_push_loop); |
| 1265 | 1270 |
| 1266 // In case of OSR, we have to restore the XMM registers. | 1271 // In case of OSR or a failed STUB, we have to restore the XMM registers. |
| 1267 if (type() == OSR) { | 1272 if (CpuFeatures::IsSupported(SSE2)) { |
| 1268 if (CpuFeatures::IsSupported(SSE2)) { | 1273 CpuFeatures::Scope scope(SSE2); |
| 1269 CpuFeatures::Scope scope(SSE2); | 1274 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { |
| 1270 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { | 1275 XMMRegister xmm_reg = XMMRegister::FromAllocationIndex(i); |
| 1271 XMMRegister xmm_reg = XMMRegister::FromAllocationIndex(i); | 1276 int src_offset = i * kDoubleSize + double_regs_offset; |
| 1272 int src_offset = i * kDoubleSize + double_regs_offset; | 1277 __ movdbl(xmm_reg, Operand(ebx, src_offset)); |
| 1273 __ movdbl(xmm_reg, Operand(ebx, src_offset)); | |
| 1274 } | |
| 1275 } | 1278 } |
| 1276 } | 1279 } |
| 1277 | 1280 |
| 1278 // Push state, pc, and continuation from the last output frame. | 1281 // Push state, pc, and continuation from the last output frame. |
| 1279 if (type() != OSR) { | 1282 if (type() != OSR) { |
| 1280 __ push(Operand(ebx, FrameDescription::state_offset())); | 1283 __ push(Operand(ebx, FrameDescription::state_offset())); |
| 1281 } | 1284 } |
| 1282 __ push(Operand(ebx, FrameDescription::pc_offset())); | 1285 __ push(Operand(ebx, FrameDescription::pc_offset())); |
| 1283 __ push(Operand(ebx, FrameDescription::continuation_offset())); | 1286 __ push(Operand(ebx, FrameDescription::continuation_offset())); |
| 1284 | 1287 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1309 } | 1312 } |
| 1310 __ bind(&done); | 1313 __ bind(&done); |
| 1311 } | 1314 } |
| 1312 | 1315 |
| 1313 #undef __ | 1316 #undef __ |
| 1314 | 1317 |
| 1315 | 1318 |
| 1316 } } // namespace v8::internal | 1319 } } // namespace v8::internal |
| 1317 | 1320 |
| 1318 #endif // V8_TARGET_ARCH_IA32 | 1321 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |