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

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

Issue 335005: Port optimization of calls to GenericBinaryStub to x64 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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') | no next file with comments »
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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 ToBooleanStub() { } 631 ToBooleanStub() { }
632 632
633 void Generate(MacroAssembler* masm); 633 void Generate(MacroAssembler* masm);
634 634
635 private: 635 private:
636 Major MajorKey() { return ToBoolean; } 636 Major MajorKey() { return ToBoolean; }
637 int MinorKey() { return 0; } 637 int MinorKey() { return 0; }
638 }; 638 };
639 639
640 640
641 // Flag that indicates whether how to generate code for the stub. 641 // Flag that indicates how to generate code for the stub GenericBinaryOpStub.
642 enum GenericBinaryFlags { 642 enum GenericBinaryFlags {
643 NO_GENERIC_BINARY_FLAGS = 0, 643 NO_GENERIC_BINARY_FLAGS = 0,
644 NO_SMI_CODE_IN_STUB = 1 << 0 // Omit smi code in stub. 644 NO_SMI_CODE_IN_STUB = 1 << 0 // Omit smi code in stub.
645 }; 645 };
646 646
647 647
648 class GenericBinaryOpStub: public CodeStub { 648 class GenericBinaryOpStub: public CodeStub {
649 public: 649 public:
650 GenericBinaryOpStub(Token::Value operation, 650 GenericBinaryOpStub(Token::Value op,
651 OverwriteMode mode, 651 OverwriteMode mode,
652 GenericBinaryFlags flags) 652 GenericBinaryFlags flags)
653 : op_(operation), 653 : op_(op),
654 mode_(mode), 654 mode_(mode),
655 flags_(flags), 655 flags_(flags),
656 args_in_registers_(false), 656 args_in_registers_(false),
657 args_reversed_(false) { 657 args_reversed_(false) {
658 use_sse3_ = CpuFeatures::IsSupported(CpuFeatures::SSE3); 658 use_sse3_ = CpuFeatures::IsSupported(CpuFeatures::SSE3);
659 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); 659 ASSERT(OpBits::is_valid(Token::NUM_TOKENS));
660 } 660 }
661 661
662 // Generate code to call the stub with the supplied arguments. This will add 662 // Generate code to call the stub with the supplied arguments. This will add
663 // code at the call site to prepare arguments either in registers or on the 663 // code at the call site to prepare arguments either in registers or on the
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 void SetArgsReversed() { args_reversed_ = true; } 725 void SetArgsReversed() { args_reversed_ = true; }
726 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } 726 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; }
727 bool HasArgumentsInRegisters() { return args_in_registers_; } 727 bool HasArgumentsInRegisters() { return args_in_registers_; }
728 bool HasArgumentsReversed() { return args_reversed_; } 728 bool HasArgumentsReversed() { return args_reversed_; }
729 }; 729 };
730 730
731 731
732 } } // namespace v8::internal 732 } } // namespace v8::internal
733 733
734 #endif // V8_IA32_CODEGEN_IA32_H_ 734 #endif // V8_IA32_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698