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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 551043005: Added CallInterfaceDescriptors to all code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 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/ia32/code-stubs-ia32.h ('k') | src/ia32/interface-descriptors-ia32.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 __ cmp(scratch, factory->heap_number_map()); 373 __ cmp(scratch, factory->heap_number_map());
374 __ j(not_equal, non_float); // argument in eax is not a number -> NaN 374 __ j(not_equal, non_float); // argument in eax is not a number -> NaN
375 375
376 // Fall-through: Both operands are numbers. 376 // Fall-through: Both operands are numbers.
377 __ bind(&done); 377 __ bind(&done);
378 } 378 }
379 379
380 380
381 void MathPowStub::Generate(MacroAssembler* masm) { 381 void MathPowStub::Generate(MacroAssembler* masm) {
382 Factory* factory = isolate()->factory(); 382 Factory* factory = isolate()->factory();
383 const Register exponent = eax; 383 const Register exponent = MathPowTaggedDescriptor::exponent();
384 DCHECK(exponent.is(eax));
384 const Register base = edx; 385 const Register base = edx;
385 const Register scratch = ecx; 386 const Register scratch = ecx;
386 const XMMRegister double_result = xmm3; 387 const XMMRegister double_result = xmm3;
387 const XMMRegister double_base = xmm2; 388 const XMMRegister double_base = xmm2;
388 const XMMRegister double_exponent = xmm1; 389 const XMMRegister double_exponent = xmm1;
389 const XMMRegister double_scratch = xmm4; 390 const XMMRegister double_scratch = xmm4;
390 391
391 Label call_runtime, done, exponent_not_smi, int_exponent; 392 Label call_runtime, done, exponent_not_smi, int_exponent;
392 393
393 // Save 1 in double_result - we need this several times later on. 394 // Save 1 in double_result - we need this several times later on.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax, 653 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax,
653 ebx, &miss); 654 ebx, &miss);
654 __ bind(&miss); 655 __ bind(&miss);
655 PropertyAccessCompiler::TailCallBuiltin( 656 PropertyAccessCompiler::TailCallBuiltin(
656 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 657 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
657 } 658 }
658 659
659 660
660 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 661 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
661 // The key is in edx and the parameter count is in eax. 662 // The key is in edx and the parameter count is in eax.
663 DCHECK(edx.is(ArgumentsAccessReadDescriptor::index()));
664 DCHECK(eax.is(ArgumentsAccessReadDescriptor::parameter_count()));
662 665
663 // The displacement is used for skipping the frame pointer on the 666 // The displacement is used for skipping the frame pointer on the
664 // stack. It is the offset of the last parameter (if any) relative 667 // stack. It is the offset of the last parameter (if any) relative
665 // to the frame pointer. 668 // to the frame pointer.
666 static const int kDisplacement = 1 * kPointerSize; 669 static const int kDisplacement = 1 * kPointerSize;
667 670
668 // Check that the key is a smi. 671 // Check that the key is a smi.
669 Label slow; 672 Label slow;
670 __ JumpIfNotSmi(edx, &slow, Label::kNear); 673 __ JumpIfNotSmi(edx, &slow, Label::kNear);
671 674
(...skipping 3955 matching lines...) Expand 10 before | Expand all | Expand 10 after
4627 4630
4628 4631
4629 void CallApiGetterStub::Generate(MacroAssembler* masm) { 4632 void CallApiGetterStub::Generate(MacroAssembler* masm) {
4630 // ----------- S t a t e ------------- 4633 // ----------- S t a t e -------------
4631 // -- esp[0] : return address 4634 // -- esp[0] : return address
4632 // -- esp[4] : name 4635 // -- esp[4] : name
4633 // -- esp[8 - kArgsLength*4] : PropertyCallbackArguments object 4636 // -- esp[8 - kArgsLength*4] : PropertyCallbackArguments object
4634 // -- ... 4637 // -- ...
4635 // -- edx : api_function_address 4638 // -- edx : api_function_address
4636 // ----------------------------------- 4639 // -----------------------------------
4640 DCHECK(edx.is(ApiGetterDescriptor::function_address()));
4637 4641
4638 // array for v8::Arguments::values_, handler for name and pointer 4642 // array for v8::Arguments::values_, handler for name and pointer
4639 // to the values (it considered as smi in GC). 4643 // to the values (it considered as smi in GC).
4640 const int kStackSpace = PropertyCallbackArguments::kArgsLength + 2; 4644 const int kStackSpace = PropertyCallbackArguments::kArgsLength + 2;
4641 // Allocate space for opional callback address parameter in case 4645 // Allocate space for opional callback address parameter in case
4642 // CPU profiler is active. 4646 // CPU profiler is active.
4643 const int kApiArgc = 2 + 1; 4647 const int kApiArgc = 2 + 1;
4644 4648
4645 Register api_function_address = edx; 4649 Register api_function_address = edx;
4646 Register scratch = ebx; 4650 Register scratch = ebx;
(...skipping 16 matching lines...) Expand all
4663 Operand(ebp, 7 * kPointerSize), 4667 Operand(ebp, 7 * kPointerSize),
4664 NULL); 4668 NULL);
4665 } 4669 }
4666 4670
4667 4671
4668 #undef __ 4672 #undef __
4669 4673
4670 } } // namespace v8::internal 4674 } } // namespace v8::internal
4671 4675
4672 #endif // V8_TARGET_ARCH_IA32 4676 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.h ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698