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 |
20 // sign-extend the least significant 16-bits of value <imm> | 25 // sign-extend the least significant 16-bits of value <imm> |
21 #define SIGN_EXT_IMM16(imm) ((static_cast<int>(imm) << 16) >> 16) | 26 #define SIGN_EXT_IMM16(imm) ((static_cast<int>(imm) << 16) >> 16) |
22 | 27 |
23 // sign-extend the least significant 26-bits of value <imm> | 28 // sign-extend the least significant 26-bits of value <imm> |
24 #define SIGN_EXT_IMM26(imm) ((static_cast<int>(imm) << 6) >> 6) | 29 #define SIGN_EXT_IMM26(imm) ((static_cast<int>(imm) << 6) >> 6) |
25 | 30 |
26 // ----------------------------------------------------------------------------- | 31 // ----------------------------------------------------------------------------- |
27 // Conditions. | 32 // Conditions. |
28 | 33 |
29 // Defines constants and accessor classes to assemble, disassemble and | 34 // Defines constants and accessor classes to assemble, disassemble and |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 // Lookup the register number for the name provided. | 582 // Lookup the register number for the name provided. |
578 static int Number(const char* name); | 583 static int Number(const char* name); |
579 | 584 |
580 private: | 585 private: |
581 static const char* names_[kNumFPRegisters]; | 586 static const char* names_[kNumFPRegisters]; |
582 }; | 587 }; |
583 } | 588 } |
584 } // namespace v8::internal | 589 } // namespace v8::internal |
585 | 590 |
586 #endif // V8_PPC_CONSTANTS_PPC_H_ | 591 #endif // V8_PPC_CONSTANTS_PPC_H_ |
OLD | NEW |