OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 DCHECK(IsRegister()); | 432 DCHECK(IsRegister()); |
433 return Register::from_code(register_code()); | 433 return Register::from_code(register_code()); |
434 } | 434 } |
435 | 435 |
436 FloatRegister GetFloatRegister() const { | 436 FloatRegister GetFloatRegister() const { |
437 DCHECK(IsFloatRegister()); | 437 DCHECK(IsFloatRegister()); |
438 return FloatRegister::from_code(register_code()); | 438 return FloatRegister::from_code(register_code()); |
439 } | 439 } |
440 | 440 |
441 DoubleRegister GetDoubleRegister() const { | 441 DoubleRegister GetDoubleRegister() const { |
442 // TODO(bbudge) Tighten this test to IsDoubleRegister when all code | 442 // On platforms where FloatRegister, DoubleRegister, and Simd128Register |
443 // generators are changed to use the correct Get*Register method. | 443 // are all the same type, it's convenient to treat everything as a |
| 444 // DoubleRegister, so be lax about type checking here. |
444 DCHECK(IsFPRegister()); | 445 DCHECK(IsFPRegister()); |
445 return DoubleRegister::from_code(register_code()); | 446 return DoubleRegister::from_code(register_code()); |
446 } | 447 } |
447 | 448 |
448 Simd128Register GetSimd128Register() const { | 449 Simd128Register GetSimd128Register() const { |
449 DCHECK(IsSimd128Register()); | 450 DCHECK(IsSimd128Register()); |
450 return Simd128Register::from_code(register_code()); | 451 return Simd128Register::from_code(register_code()); |
451 } | 452 } |
452 | 453 |
453 LocationKind location_kind() const { | 454 LocationKind location_kind() const { |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 | 1481 |
1481 | 1482 |
1482 std::ostream& operator<<(std::ostream& os, | 1483 std::ostream& operator<<(std::ostream& os, |
1483 const PrintableInstructionSequence& code); | 1484 const PrintableInstructionSequence& code); |
1484 | 1485 |
1485 } // namespace compiler | 1486 } // namespace compiler |
1486 } // namespace internal | 1487 } // namespace internal |
1487 } // namespace v8 | 1488 } // namespace v8 |
1488 | 1489 |
1489 #endif // V8_COMPILER_INSTRUCTION_H_ | 1490 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |