OLD | NEW |
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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 | 658 |
659 class GenericBinaryOpStub: public CodeStub { | 659 class GenericBinaryOpStub: public CodeStub { |
660 public: | 660 public: |
661 GenericBinaryOpStub(Token::Value op, | 661 GenericBinaryOpStub(Token::Value op, |
662 OverwriteMode mode, | 662 OverwriteMode mode, |
663 GenericBinaryFlags flags) | 663 GenericBinaryFlags flags) |
664 : op_(op), | 664 : op_(op), |
665 mode_(mode), | 665 mode_(mode), |
666 flags_(flags), | 666 flags_(flags), |
667 args_in_registers_(false), | 667 args_in_registers_(false), |
668 args_reversed_(false) { | 668 args_reversed_(false), |
| 669 name_(NULL) { |
669 use_sse3_ = CpuFeatures::IsSupported(SSE3); | 670 use_sse3_ = CpuFeatures::IsSupported(SSE3); |
670 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); | 671 ASSERT(OpBits::is_valid(Token::NUM_TOKENS)); |
671 } | 672 } |
672 | 673 |
673 // Generate code to call the stub with the supplied arguments. This will add | 674 // Generate code to call the stub with the supplied arguments. This will add |
674 // code at the call site to prepare arguments either in registers or on the | 675 // code at the call site to prepare arguments either in registers or on the |
675 // stack together with the actual call. | 676 // stack together with the actual call. |
676 void GenerateCall(MacroAssembler* masm, Register left, Register right); | 677 void GenerateCall(MacroAssembler* masm, Register left, Register right); |
677 void GenerateCall(MacroAssembler* masm, Register left, Smi* right); | 678 void GenerateCall(MacroAssembler* masm, Register left, Smi* right); |
678 void GenerateCall(MacroAssembler* masm, Smi* left, Register right); | 679 void GenerateCall(MacroAssembler* masm, Smi* left, Register right); |
679 | 680 |
680 private: | 681 private: |
681 Token::Value op_; | 682 Token::Value op_; |
682 OverwriteMode mode_; | 683 OverwriteMode mode_; |
683 GenericBinaryFlags flags_; | 684 GenericBinaryFlags flags_; |
684 bool args_in_registers_; // Arguments passed in registers not on the stack. | 685 bool args_in_registers_; // Arguments passed in registers not on the stack. |
685 bool args_reversed_; // Left and right argument are swapped. | 686 bool args_reversed_; // Left and right argument are swapped. |
686 bool use_sse3_; | 687 bool use_sse3_; |
| 688 char* name_; |
687 | 689 |
688 const char* GetName(); | 690 const char* GetName(); |
689 | 691 |
690 #ifdef DEBUG | 692 #ifdef DEBUG |
691 void Print() { | 693 void Print() { |
692 PrintF("GenericBinaryOpStub (op %s), " | 694 PrintF("GenericBinaryOpStub (op %s), " |
693 "(mode %d, flags %d, registers %d, reversed %d)\n", | 695 "(mode %d, flags %d, registers %d, reversed %d)\n", |
694 Token::String(op_), | 696 Token::String(op_), |
695 static_cast<int>(mode_), | 697 static_cast<int>(mode_), |
696 static_cast<int>(flags_), | 698 static_cast<int>(flags_), |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 bool ascii); | 769 bool ascii); |
768 | 770 |
769 // Should the stub check whether arguments are strings? | 771 // Should the stub check whether arguments are strings? |
770 bool string_check_; | 772 bool string_check_; |
771 }; | 773 }; |
772 | 774 |
773 | 775 |
774 } } // namespace v8::internal | 776 } } // namespace v8::internal |
775 | 777 |
776 #endif // V8_IA32_CODEGEN_IA32_H_ | 778 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |