| 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 #include "src/globals.h" | 7 #include "src/globals.h" |
| 8 // UNIMPLEMENTED_ macro for MIPS. | 8 // UNIMPLEMENTED_ macro for MIPS. |
| 9 #ifdef DEBUG | 9 #ifdef DEBUG |
| 10 #define UNIMPLEMENTED_MIPS() \ | 10 #define UNIMPLEMENTED_MIPS() \ |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #define IsFpxxMode() (kFpuMode == kFPXX) | 101 #define IsFpxxMode() (kFpuMode == kFPXX) |
| 102 | 102 |
| 103 #ifndef _MIPS_ARCH_MIPS32RX | 103 #ifndef _MIPS_ARCH_MIPS32RX |
| 104 #define IsMipsArchVariant(check) \ | 104 #define IsMipsArchVariant(check) \ |
| 105 (kArchVariant == check) | 105 (kArchVariant == check) |
| 106 #else | 106 #else |
| 107 #define IsMipsArchVariant(check) \ | 107 #define IsMipsArchVariant(check) \ |
| 108 (CpuFeatures::IsSupported(static_cast<CpuFeature>(check))) | 108 (CpuFeatures::IsSupported(static_cast<CpuFeature>(check))) |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 #if defined(V8_TARGET_LITTLE_ENDIAN) |
| 112 const uint32_t kMipsLwrOffset = 0; |
| 113 const uint32_t kMipsLwlOffset = 3; |
| 114 const uint32_t kMipsSwrOffset = 0; |
| 115 const uint32_t kMipsSwlOffset = 3; |
| 116 #elif defined(V8_TARGET_BIG_ENDIAN) |
| 117 const uint32_t kMipsLwrOffset = 3; |
| 118 const uint32_t kMipsLwlOffset = 0; |
| 119 const uint32_t kMipsSwrOffset = 3; |
| 120 const uint32_t kMipsSwlOffset = 0; |
| 121 #else |
| 122 #error Unknown endianness |
| 123 #endif |
| 111 | 124 |
| 112 #define __STDC_FORMAT_MACROS | 125 #define __STDC_FORMAT_MACROS |
| 113 #include <inttypes.h> | 126 #include <inttypes.h> |
| 114 | 127 |
| 115 // Defines constants and accessor classes to assemble, disassemble and | 128 // Defines constants and accessor classes to assemble, disassemble and |
| 116 // simulate MIPS32 instructions. | 129 // simulate MIPS32 instructions. |
| 117 // | 130 // |
| 118 // See: MIPS32 Architecture For Programmers | 131 // See: MIPS32 Architecture For Programmers |
| 119 // Volume II: The MIPS32 Instruction Set | 132 // Volume II: The MIPS32 Instruction Set |
| 120 // Try www.cs.cornell.edu/courses/cs3410/2008fa/MIPS_Vol2.pdf. | 133 // Try www.cs.cornell.edu/courses/cs3410/2008fa/MIPS_Vol2.pdf. |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 } | 1230 } |
| 1218 } | 1231 } |
| 1219 } | 1232 } |
| 1220 | 1233 |
| 1221 #undef OpcodeToBitNumber | 1234 #undef OpcodeToBitNumber |
| 1222 #undef FunctionFieldToBitNumber | 1235 #undef FunctionFieldToBitNumber |
| 1223 } // namespace internal | 1236 } // namespace internal |
| 1224 } // namespace v8 | 1237 } // namespace v8 |
| 1225 | 1238 |
| 1226 #endif // #ifndef V8_MIPS_CONSTANTS_H_ | 1239 #endif // #ifndef V8_MIPS_CONSTANTS_H_ |
| OLD | NEW |