| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 class Registers { | 118 class Registers { |
| 119 public: | 119 public: |
| 120 // Return the name of the register. | 120 // Return the name of the register. |
| 121 static const char* Name(int reg); | 121 static const char* Name(int reg); |
| 122 | 122 |
| 123 // Lookup the register number for the name provided. | 123 // Lookup the register number for the name provided. |
| 124 static int Number(const char* name); | 124 static int Number(const char* name); |
| 125 | 125 |
| 126 struct RegisterAlias { | 126 struct RegisterAlias { |
| 127 int reg; | 127 int reg; |
| 128 const char *name; | 128 const char* name; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 static const int32_t kMaxValue = 0x7fffffff; | 131 static const int32_t kMaxValue = 0x7fffffff; |
| 132 static const int32_t kMinValue = 0x80000000; | 132 static const int32_t kMinValue = 0x80000000; |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 static const char* names_[kNumSimuRegisters]; | 135 static const char* names_[kNumSimuRegisters]; |
| 136 static const RegisterAlias aliases_[]; | 136 static const RegisterAlias aliases_[]; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 // Helper functions for converting between register numbers and names. | 139 // Helper functions for converting between register numbers and names. |
| 140 class FPURegisters { | 140 class FPURegisters { |
| 141 public: | 141 public: |
| 142 // Return the name of the register. | 142 // Return the name of the register. |
| 143 static const char* Name(int reg); | 143 static const char* Name(int reg); |
| 144 | 144 |
| 145 // Lookup the register number for the name provided. | 145 // Lookup the register number for the name provided. |
| 146 static int Number(const char* name); | 146 static int Number(const char* name); |
| 147 | 147 |
| 148 struct RegisterAlias { | 148 struct RegisterAlias { |
| 149 int creg; | 149 int creg; |
| 150 const char *name; | 150 const char* name; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 private: | 153 private: |
| 154 static const char* names_[kNumFPURegisters]; | 154 static const char* names_[kNumFPURegisters]; |
| 155 static const RegisterAlias aliases_[]; | 155 static const RegisterAlias aliases_[]; |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 | 158 |
| 159 // ----------------------------------------------------------------------------- | 159 // ----------------------------------------------------------------------------- |
| 160 // Instructions encoding constants. | 160 // Instructions encoding constants. |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; | 780 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; |
| 781 | 781 |
| 782 const int kDoubleAlignmentBits = 3; | 782 const int kDoubleAlignmentBits = 3; |
| 783 const int kDoubleAlignment = (1 << kDoubleAlignmentBits); | 783 const int kDoubleAlignment = (1 << kDoubleAlignmentBits); |
| 784 const int kDoubleAlignmentMask = kDoubleAlignment - 1; | 784 const int kDoubleAlignmentMask = kDoubleAlignment - 1; |
| 785 | 785 |
| 786 | 786 |
| 787 } } // namespace v8::internal | 787 } } // namespace v8::internal |
| 788 | 788 |
| 789 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 789 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
| OLD | NEW |