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

Side by Side Diff: src/ia32/codegen-ia32.h

Issue 554062: Use registers to pass arguments to GenericBinaryOpStub.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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 | « no previous file | src/ia32/codegen-ia32.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 | FlagBits::encode(flags_) 691 | FlagBits::encode(flags_)
692 | SSE3Bits::encode(use_sse3_) 692 | SSE3Bits::encode(use_sse3_)
693 | ArgsInRegistersBits::encode(args_in_registers_) 693 | ArgsInRegistersBits::encode(args_in_registers_)
694 | ArgsReversedBits::encode(args_reversed_); 694 | ArgsReversedBits::encode(args_reversed_);
695 } 695 }
696 696
697 void Generate(MacroAssembler* masm); 697 void Generate(MacroAssembler* masm);
698 void GenerateSmiCode(MacroAssembler* masm, Label* slow); 698 void GenerateSmiCode(MacroAssembler* masm, Label* slow);
699 void GenerateLoadArguments(MacroAssembler* masm); 699 void GenerateLoadArguments(MacroAssembler* masm);
700 void GenerateReturn(MacroAssembler* masm); 700 void GenerateReturn(MacroAssembler* masm);
701 void GenerateHeapResultAllocation(MacroAssembler* masm, Label* alloc_failure);
701 702
703 // Args in registers are always OK for ADD and SUB. Floating-point MUL and DIV
704 // are also OK. Though MUL and DIV on SMIs modify the original registers so
705 // we need to push args on stack anyway.
702 bool ArgsInRegistersSupported() { 706 bool ArgsInRegistersSupported() {
703 return ((op_ == Token::ADD) || (op_ == Token::SUB) 707 return ((op_ == Token::ADD) || (op_ == Token::SUB)) ||
Kevin Millikin (Chromium) 2010/01/25 16:27:44 You lost a two-space indent here. This is a compl
Vladislav Kaznacheev 2010/01/25 17:44:53 Done.
704 || (op_ == Token::MUL) || (op_ == Token::DIV)) 708 (((op_ == Token::MUL) || (op_ == Token::DIV))
705 && flags_ != NO_SMI_CODE_IN_STUB; 709 && (flags_ == NO_SMI_CODE_IN_STUB));
706 } 710 }
707 bool IsOperationCommutative() { 711 bool IsOperationCommutative() {
708 return (op_ == Token::ADD) || (op_ == Token::MUL); 712 return (op_ == Token::ADD) || (op_ == Token::MUL);
709 } 713 }
710 714
711 void SetArgsInRegisters() { args_in_registers_ = true; } 715 void SetArgsInRegisters() { args_in_registers_ = true; }
712 void SetArgsReversed() { args_reversed_ = true; } 716 void SetArgsReversed() { args_reversed_ = true; }
713 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } 717 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; }
714 bool HasArgumentsInRegisters() { return args_in_registers_; } 718 bool HasArgumentsInRegisters() { return args_in_registers_; }
Kevin Millikin (Chromium) 2010/01/25 16:27:44 I'm not sure why HasArguments is spelled out but S
Vladislav Kaznacheev 2010/01/25 17:44:53 Done.
715 bool HasArgumentsReversed() { return args_reversed_; } 719 bool HasArgumentsReversed() { return args_reversed_; }
716 }; 720 };
717 721
718 722
719 // Flag that indicates how to generate code for the stub StringAddStub. 723 // Flag that indicates how to generate code for the stub StringAddStub.
720 enum StringAddFlags { 724 enum StringAddFlags {
721 NO_STRING_ADD_FLAGS = 0, 725 NO_STRING_ADD_FLAGS = 0,
722 NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub. 726 NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub.
723 }; 727 };
724 728
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 Major MajorKey() { return StringCompare; } 799 Major MajorKey() { return StringCompare; }
796 int MinorKey() { return 0; } 800 int MinorKey() { return 0; }
797 801
798 void Generate(MacroAssembler* masm); 802 void Generate(MacroAssembler* masm);
799 }; 803 };
800 804
801 805
802 } } // namespace v8::internal 806 } } // namespace v8::internal
803 807
804 #endif // V8_IA32_CODEGEN_IA32_H_ 808 #endif // V8_IA32_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698