| 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_PPC_CONSTANTS_PPC_H_ | 5 #ifndef V8_PPC_CONSTANTS_PPC_H_ |
| 6 #define V8_PPC_CONSTANTS_PPC_H_ | 6 #define V8_PPC_CONSTANTS_PPC_H_ |
| 7 | 7 |
| 8 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| 11 // Number of registers | 11 // Number of registers |
| 12 const int kNumRegisters = 32; | 12 const int kNumRegisters = 32; |
| 13 | 13 |
| 14 // FP support. | 14 // FP support. |
| 15 const int kNumFPDoubleRegisters = 32; | 15 const int kNumFPDoubleRegisters = 32; |
| 16 const int kNumFPRegisters = kNumFPDoubleRegisters; | 16 const int kNumFPRegisters = kNumFPDoubleRegisters; |
| 17 | 17 |
| 18 const int kNoRegister = -1; | 18 const int kNoRegister = -1; |
| 19 | 19 |
| 20 // Used in embedded constant pool builder - max reach in bits for | |
| 21 // various load instructions (one less due to unsigned) | |
| 22 const int kLoadPtrMaxReachBits = 15; | |
| 23 const int kLoadDoubleMaxReachBits = 15; | |
| 24 | |
| 25 // sign-extend the least significant 16-bits of value <imm> | 20 // sign-extend the least significant 16-bits of value <imm> |
| 26 #define SIGN_EXT_IMM16(imm) ((static_cast<int>(imm) << 16) >> 16) | 21 #define SIGN_EXT_IMM16(imm) ((static_cast<int>(imm) << 16) >> 16) |
| 27 | 22 |
| 28 // sign-extend the least significant 26-bits of value <imm> | 23 // sign-extend the least significant 26-bits of value <imm> |
| 29 #define SIGN_EXT_IMM26(imm) ((static_cast<int>(imm) << 6) >> 6) | 24 #define SIGN_EXT_IMM26(imm) ((static_cast<int>(imm) << 6) >> 6) |
| 30 | 25 |
| 31 // ----------------------------------------------------------------------------- | 26 // ----------------------------------------------------------------------------- |
| 32 // Conditions. | 27 // Conditions. |
| 33 | 28 |
| 34 // Defines constants and accessor classes to assemble, disassemble and | 29 // Defines constants and accessor classes to assemble, disassemble and |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 // Lookup the register number for the name provided. | 577 // Lookup the register number for the name provided. |
| 583 static int Number(const char* name); | 578 static int Number(const char* name); |
| 584 | 579 |
| 585 private: | 580 private: |
| 586 static const char* names_[kNumFPRegisters]; | 581 static const char* names_[kNumFPRegisters]; |
| 587 }; | 582 }; |
| 588 } | 583 } |
| 589 } // namespace v8::internal | 584 } // namespace v8::internal |
| 590 | 585 |
| 591 #endif // V8_PPC_CONSTANTS_PPC_H_ | 586 #endif // V8_PPC_CONSTANTS_PPC_H_ |
| OLD | NEW |