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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 23530066: Lazily save double registers for HCallRuntime instructions within Hydrogen code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 void LCodeGen::CallCode(Handle<Code> code, 631 void LCodeGen::CallCode(Handle<Code> code,
632 RelocInfo::Mode mode, 632 RelocInfo::Mode mode,
633 LInstruction* instr) { 633 LInstruction* instr) {
634 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT, 0); 634 CallCodeGeneric(code, mode, instr, RECORD_SIMPLE_SAFEPOINT, 0);
635 } 635 }
636 636
637 637
638 void LCodeGen::CallRuntime(const Runtime::Function* function, 638 void LCodeGen::CallRuntime(const Runtime::Function* function,
639 int num_arguments, 639 int num_arguments,
640 LInstruction* instr) { 640 LInstruction* instr,
641 SaveFPRegsMode save_doubles) {
641 ASSERT(instr != NULL); 642 ASSERT(instr != NULL);
642 ASSERT(instr->HasPointerMap()); 643 ASSERT(instr->HasPointerMap());
643 LPointerMap* pointers = instr->pointer_map(); 644 LPointerMap* pointers = instr->pointer_map();
644 RecordPosition(pointers->position()); 645 RecordPosition(pointers->position());
645 646
646 __ CallRuntime(function, num_arguments); 647 __ CallRuntime(function, num_arguments, save_doubles);
648
647 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0); 649 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0);
648 } 650 }
649 651
650 652
651 void LCodeGen::CallRuntimeFromDeferred(Runtime::FunctionId id, 653 void LCodeGen::CallRuntimeFromDeferred(Runtime::FunctionId id,
652 int argc, 654 int argc,
653 LInstruction* instr) { 655 LInstruction* instr) {
654 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 656 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
655 __ CallRuntimeSaveDoubles(id); 657 __ CallRuntimeSaveDoubles(id);
656 RecordSafepointWithRegisters( 658 RecordSafepointWithRegisters(
(...skipping 3242 matching lines...) Expand 10 before | Expand all | Expand 10 after
3899 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3901 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3900 __ bind(&done); 3902 __ bind(&done);
3901 } else { 3903 } else {
3902 ArrayNArgumentsConstructorStub stub(kind, context_mode, override_mode); 3904 ArrayNArgumentsConstructorStub stub(kind, context_mode, override_mode);
3903 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr); 3905 CallCode(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL, instr);
3904 } 3906 }
3905 } 3907 }
3906 3908
3907 3909
3908 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 3910 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
3909 CallRuntime(instr->function(), instr->arity(), instr); 3911 CallRuntime(instr->function(), instr->arity(), instr, instr->save_doubles());
3910 } 3912 }
3911 3913
3912 3914
3913 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) { 3915 void LCodeGen::DoStoreCodeEntry(LStoreCodeEntry* instr) {
3914 Register function = ToRegister(instr->function()); 3916 Register function = ToRegister(instr->function());
3915 Register code_object = ToRegister(instr->code_object()); 3917 Register code_object = ToRegister(instr->code_object());
3916 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize)); 3918 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize));
3917 __ movq(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object); 3919 __ movq(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object);
3918 } 3920 }
3919 3921
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after
5506 FixedArray::kHeaderSize - kPointerSize)); 5508 FixedArray::kHeaderSize - kPointerSize));
5507 __ bind(&done); 5509 __ bind(&done);
5508 } 5510 }
5509 5511
5510 5512
5511 #undef __ 5513 #undef __
5512 5514
5513 } } // namespace v8::internal 5515 } } // namespace v8::internal
5514 5516
5515 #endif // V8_TARGET_ARCH_X64 5517 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698