Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: src/arm/deoptimizer-arm.cc

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 output_frame_offset -= kPointerSize; 526 output_frame_offset -= kPointerSize;
527 value = reinterpret_cast<intptr_t>( 527 value = reinterpret_cast<intptr_t>(
528 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE)); 528 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE));
529 output_frame->SetFrameSlot(output_frame_offset, value); 529 output_frame->SetFrameSlot(output_frame_offset, value);
530 530
531 for (int i = 0; i < descriptor->register_param_count_; ++i) { 531 for (int i = 0; i < descriptor->register_param_count_; ++i) {
532 output_frame_offset -= kPointerSize; 532 output_frame_offset -= kPointerSize;
533 DoTranslateCommand(iterator, 0, output_frame_offset); 533 DoTranslateCommand(iterator, 0, output_frame_offset);
534 } 534 }
535 535
536 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; ++i) {
537 double double_value = input_->GetDoubleRegister(i);
538 output_frame->SetDoubleRegister(i, double_value);
539 }
540
536 value = input_->GetRegister(fp.code()); 541 value = input_->GetRegister(fp.code());
537 output_frame->SetRegister(fp.code(), value); 542 output_frame->SetRegister(fp.code(), value);
538 output_frame->SetFp(value); 543 output_frame->SetFp(value);
539 544
540 ApiFunction function(descriptor->deoptimization_handler_); 545 ApiFunction function(descriptor->deoptimization_handler_);
541 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_); 546 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_);
542 intptr_t handler = reinterpret_cast<intptr_t>(xref.address()); 547 intptr_t handler = reinterpret_cast<intptr_t>(xref.address());
543 output_frame->SetRegister(r0.code(), descriptor->register_param_count_); 548 output_frame->SetRegister(r0.code(), descriptor->register_param_count_);
544 output_frame->SetRegister(r1.code(), handler); 549 output_frame->SetRegister(r1.code(), handler);
545 } 550 }
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 __ bind(&inner_loop_header); 1156 __ bind(&inner_loop_header);
1152 __ cmp(r3, Operand::Zero()); 1157 __ cmp(r3, Operand::Zero());
1153 __ b(ne, &inner_push_loop); // test for gt? 1158 __ b(ne, &inner_push_loop); // test for gt?
1154 __ add(r4, r4, Operand(kPointerSize)); 1159 __ add(r4, r4, Operand(kPointerSize));
1155 __ bind(&outer_loop_header); 1160 __ bind(&outer_loop_header);
1156 __ cmp(r4, r1); 1161 __ cmp(r4, r1);
1157 __ b(lt, &outer_push_loop); 1162 __ b(lt, &outer_push_loop);
1158 1163
1159 if (CpuFeatures::IsSupported(VFP2)) { 1164 if (CpuFeatures::IsSupported(VFP2)) {
1160 CpuFeatures::Scope scope(VFP2); 1165 CpuFeatures::Scope scope(VFP2);
1161 // In case of OSR, we have to restore the d registers. 1166 // Check CPU flags for number of registers, setting the Z condition flag.
1162 if (type() == OSR) { 1167 __ CheckFor32DRegs(ip);
1163 // Check CPU flags for number of registers, setting the Z condition flag.
1164 __ CheckFor32DRegs(ip);
1165 1168
1166 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset())); 1169 __ ldr(r1, MemOperand(r0, Deoptimizer::input_offset()));
1167 int src_offset = FrameDescription::double_registers_offset(); 1170 int src_offset = FrameDescription::double_registers_offset();
1168 for (int i = 0; i < DwVfpRegister::kNumRegisters; ++i) { 1171 for (int i = 0; i < DwVfpRegister::kMaxNumRegisters; ++i) {
1169 if (i == kDoubleRegZero.code()) continue; 1172 if (i == kDoubleRegZero.code()) continue;
1170 if (i == kScratchDoubleReg.code()) continue; 1173 if (i == kScratchDoubleReg.code()) continue;
1171 1174
1172 const DwVfpRegister reg = DwVfpRegister::from_code(i); 1175 const DwVfpRegister reg = DwVfpRegister::from_code(i);
1173 __ vldr(reg, r1, src_offset, i < 16 ? al : ne); 1176 __ vldr(reg, r1, src_offset, i < 16 ? al : ne);
1174 src_offset += kDoubleSize; 1177 src_offset += kDoubleSize;
1175 }
1176 } 1178 }
1177 } 1179 }
1178 1180
1179 // Push state, pc, and continuation from the last output frame. 1181 // Push state, pc, and continuation from the last output frame.
1180 if (type() != OSR) { 1182 if (type() != OSR) {
1181 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset())); 1183 __ ldr(r6, MemOperand(r2, FrameDescription::state_offset()));
1182 __ push(r6); 1184 __ push(r6);
1183 } 1185 }
1184 1186
1185 __ ldr(r6, MemOperand(r2, FrameDescription::pc_offset())); 1187 __ ldr(r6, MemOperand(r2, FrameDescription::pc_offset()));
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 __ push(ip); 1228 __ push(ip);
1227 __ b(&done); 1229 __ b(&done);
1228 ASSERT(masm()->pc_offset() - start == table_entry_size_); 1230 ASSERT(masm()->pc_offset() - start == table_entry_size_);
1229 } 1231 }
1230 __ bind(&done); 1232 __ bind(&done);
1231 } 1233 }
1232 1234
1233 #undef __ 1235 #undef __
1234 1236
1235 } } // namespace v8::internal 1237 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698