| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS_CONSTANTS_H_ | 5 #ifndef V8_MIPS_CONSTANTS_H_ |
| 6 #define V8_MIPS_CONSTANTS_H_ | 6 #define V8_MIPS_CONSTANTS_H_ |
| 7 | 7 |
| 8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
| 9 #include "src/base/macros.h" | 9 #include "src/base/macros.h" |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #ifdef _MIPS_ARCH_MIPS64R2 | 29 #ifdef _MIPS_ARCH_MIPS64R2 |
| 30 static const ArchVariants kArchVariant = kMips64r2; | 30 static const ArchVariants kArchVariant = kMips64r2; |
| 31 #elif _MIPS_ARCH_MIPS64R6 | 31 #elif _MIPS_ARCH_MIPS64R6 |
| 32 static const ArchVariants kArchVariant = kMips64r6; | 32 static const ArchVariants kArchVariant = kMips64r6; |
| 33 #else | 33 #else |
| 34 static const ArchVariants kArchVariant = kMips64r2; | 34 static const ArchVariants kArchVariant = kMips64r2; |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 | 37 |
| 38 enum Endianness { kLittle, kBig }; |
| 39 |
| 40 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 41 static const Endianness kArchEndian = kLittle; |
| 42 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 43 static const Endianness kArchEndian = kBig; |
| 44 #else |
| 45 #error Unknown endianness |
| 46 #endif |
| 47 |
| 38 // TODO(plind): consider deriving ABI from compiler flags or build system. | 48 // TODO(plind): consider deriving ABI from compiler flags or build system. |
| 39 | 49 |
| 40 // ABI-dependent definitions are made with #define in simulator-mips64.h, | 50 // ABI-dependent definitions are made with #define in simulator-mips64.h, |
| 41 // so the ABI choice must be available to the pre-processor. However, in all | 51 // so the ABI choice must be available to the pre-processor. However, in all |
| 42 // other cases, we should use the enum AbiVariants with normal if statements. | 52 // other cases, we should use the enum AbiVariants with normal if statements. |
| 43 | 53 |
| 44 #define MIPS_ABI_N64 1 | 54 #define MIPS_ABI_N64 1 |
| 45 // #define MIPS_ABI_O32 1 | 55 // #define MIPS_ABI_O32 1 |
| 46 | 56 |
| 47 // The only supported Abi's are O32, and n64. | 57 // The only supported Abi's are O32, and n64. |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 // TODO(plind): below should be based on kPointerSize | 1084 // TODO(plind): below should be based on kPointerSize |
| 1075 // TODO(plind): find all usages and remove the needless instructions for n64. | 1085 // TODO(plind): find all usages and remove the needless instructions for n64. |
| 1076 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2; | 1086 const int kCArgsSlotsSize = kCArgSlotCount * Instruction::kInstrSize * 2; |
| 1077 | 1087 |
| 1078 const int kInvalidStackOffset = -1; | 1088 const int kInvalidStackOffset = -1; |
| 1079 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; | 1089 const int kBranchReturnOffset = 2 * Instruction::kInstrSize; |
| 1080 | 1090 |
| 1081 } } // namespace v8::internal | 1091 } } // namespace v8::internal |
| 1082 | 1092 |
| 1083 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 1093 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
| OLD | NEW |