OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 bool IsMarkedAsCall() const { return IsCall(); } | 259 bool IsMarkedAsCall() const { return IsCall(); } |
260 | 260 |
261 virtual bool HasResult() const = 0; | 261 virtual bool HasResult() const = 0; |
262 virtual LOperand* result() const = 0; | 262 virtual LOperand* result() const = 0; |
263 | 263 |
264 LOperand* FirstInput() { return InputAt(0); } | 264 LOperand* FirstInput() { return InputAt(0); } |
265 LOperand* Output() { return HasResult() ? result() : NULL; } | 265 LOperand* Output() { return HasResult() ? result() : NULL; } |
266 | 266 |
267 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } | 267 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } |
268 | 268 |
| 269 virtual bool MustSignExtendResult() const { return false; } |
| 270 |
269 #ifdef DEBUG | 271 #ifdef DEBUG |
270 void VerifyCall(); | 272 void VerifyCall(); |
271 #endif | 273 #endif |
272 | 274 |
273 private: | 275 private: |
274 // Iterator support. | 276 // Iterator support. |
275 friend class InputIterator; | 277 friend class InputIterator; |
276 virtual int InputCount() = 0; | 278 virtual int InputCount() = 0; |
277 virtual LOperand* InputAt(int i) = 0; | 279 virtual LOperand* InputAt(int i) = 0; |
278 | 280 |
(...skipping 15 matching lines...) Expand all Loading... |
294 class LTemplateResultInstruction : public LInstruction { | 296 class LTemplateResultInstruction : public LInstruction { |
295 public: | 297 public: |
296 // Allow 0 or 1 output operands. | 298 // Allow 0 or 1 output operands. |
297 STATIC_ASSERT(R == 0 || R == 1); | 299 STATIC_ASSERT(R == 0 || R == 1); |
298 virtual bool HasResult() const V8_FINAL V8_OVERRIDE { | 300 virtual bool HasResult() const V8_FINAL V8_OVERRIDE { |
299 return R != 0 && result() != NULL; | 301 return R != 0 && result() != NULL; |
300 } | 302 } |
301 void set_result(LOperand* operand) { results_[0] = operand; } | 303 void set_result(LOperand* operand) { results_[0] = operand; } |
302 LOperand* result() const { return results_[0]; } | 304 LOperand* result() const { return results_[0]; } |
303 | 305 |
| 306 virtual bool MustSignExtendResult() const V8_FINAL V8_OVERRIDE; |
| 307 |
304 protected: | 308 protected: |
305 EmbeddedContainer<LOperand*, R> results_; | 309 EmbeddedContainer<LOperand*, R> results_; |
306 }; | 310 }; |
307 | 311 |
308 | 312 |
309 // R = number of result operands (0 or 1). | 313 // R = number of result operands (0 or 1). |
310 // I = number of input operands. | 314 // I = number of input operands. |
311 // T = number of temporary operands. | 315 // T = number of temporary operands. |
312 template<int R, int I, int T> | 316 template<int R, int I, int T> |
313 class LTemplateInstruction : public LTemplateResultInstruction<R> { | 317 class LTemplateInstruction : public LTemplateResultInstruction<R> { |
(...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2665 | 2669 |
2666 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2670 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2667 }; | 2671 }; |
2668 | 2672 |
2669 #undef DECLARE_HYDROGEN_ACCESSOR | 2673 #undef DECLARE_HYDROGEN_ACCESSOR |
2670 #undef DECLARE_CONCRETE_INSTRUCTION | 2674 #undef DECLARE_CONCRETE_INSTRUCTION |
2671 | 2675 |
2672 } } // namespace v8::int | 2676 } } // namespace v8::int |
2673 | 2677 |
2674 #endif // V8_X64_LITHIUM_X64_H_ | 2678 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |