| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // stack together with the actual call. | 110 // stack together with the actual call. |
| 111 void GenerateCall(MacroAssembler* masm, Register left, Register right); | 111 void GenerateCall(MacroAssembler* masm, Register left, Register right); |
| 112 void GenerateCall(MacroAssembler* masm, Register left, Smi* right); | 112 void GenerateCall(MacroAssembler* masm, Register left, Smi* right); |
| 113 void GenerateCall(MacroAssembler* masm, Smi* left, Register right); | 113 void GenerateCall(MacroAssembler* masm, Smi* left, Register right); |
| 114 | 114 |
| 115 Result GenerateCall(MacroAssembler* masm, | 115 Result GenerateCall(MacroAssembler* masm, |
| 116 VirtualFrame* frame, | 116 VirtualFrame* frame, |
| 117 Result* left, | 117 Result* left, |
| 118 Result* right); | 118 Result* right); |
| 119 | 119 |
| 120 bool ArgsInRegistersSupported() { |
| 121 return op_ == Token::ADD || op_ == Token::SUB |
| 122 || op_ == Token::MUL || op_ == Token::DIV; |
| 123 } |
| 124 |
| 120 private: | 125 private: |
| 121 Token::Value op_; | 126 Token::Value op_; |
| 122 OverwriteMode mode_; | 127 OverwriteMode mode_; |
| 123 GenericBinaryFlags flags_; | 128 GenericBinaryFlags flags_; |
| 124 bool args_in_registers_; // Arguments passed in registers not on the stack. | 129 bool args_in_registers_; // Arguments passed in registers not on the stack. |
| 125 bool args_reversed_; // Left and right argument are swapped. | 130 bool args_reversed_; // Left and right argument are swapped. |
| 126 bool use_sse3_; | 131 bool use_sse3_; |
| 127 | 132 |
| 128 // Number type information of operands, determined by code generator. | 133 // Number type information of operands, determined by code generator. |
| 129 TypeInfo static_operands_type_; | 134 TypeInfo static_operands_type_; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 } | 179 } |
| 175 | 180 |
| 176 void Generate(MacroAssembler* masm); | 181 void Generate(MacroAssembler* masm); |
| 177 void GenerateSmiCode(MacroAssembler* masm, Label* slow); | 182 void GenerateSmiCode(MacroAssembler* masm, Label* slow); |
| 178 void GenerateLoadArguments(MacroAssembler* masm); | 183 void GenerateLoadArguments(MacroAssembler* masm); |
| 179 void GenerateReturn(MacroAssembler* masm); | 184 void GenerateReturn(MacroAssembler* masm); |
| 180 void GenerateHeapResultAllocation(MacroAssembler* masm, Label* alloc_failure); | 185 void GenerateHeapResultAllocation(MacroAssembler* masm, Label* alloc_failure); |
| 181 void GenerateRegisterArgsPush(MacroAssembler* masm); | 186 void GenerateRegisterArgsPush(MacroAssembler* masm); |
| 182 void GenerateTypeTransition(MacroAssembler* masm); | 187 void GenerateTypeTransition(MacroAssembler* masm); |
| 183 | 188 |
| 184 bool ArgsInRegistersSupported() { | |
| 185 return op_ == Token::ADD || op_ == Token::SUB | |
| 186 || op_ == Token::MUL || op_ == Token::DIV; | |
| 187 } | |
| 188 bool IsOperationCommutative() { | 189 bool IsOperationCommutative() { |
| 189 return (op_ == Token::ADD) || (op_ == Token::MUL); | 190 return (op_ == Token::ADD) || (op_ == Token::MUL); |
| 190 } | 191 } |
| 191 | 192 |
| 192 void SetArgsInRegisters() { args_in_registers_ = true; } | 193 void SetArgsInRegisters() { args_in_registers_ = true; } |
| 193 void SetArgsReversed() { args_reversed_ = true; } | 194 void SetArgsReversed() { args_reversed_ = true; } |
| 194 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } | 195 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } |
| 195 bool HasArgsInRegisters() { return args_in_registers_; } | 196 bool HasArgsInRegisters() { return args_in_registers_; } |
| 196 bool HasArgsReversed() { return args_reversed_; } | 197 bool HasArgsReversed() { return args_reversed_; } |
| 197 | 198 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 void Print() { | 354 void Print() { |
| 354 PrintF("NumberToStringStub\n"); | 355 PrintF("NumberToStringStub\n"); |
| 355 } | 356 } |
| 356 #endif | 357 #endif |
| 357 }; | 358 }; |
| 358 | 359 |
| 359 | 360 |
| 360 } } // namespace v8::internal | 361 } } // namespace v8::internal |
| 361 | 362 |
| 362 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 363 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |