| 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_MACHINE_TYPE_H_ | 5 #ifndef V8_MACHINE_TYPE_H_ |
| 6 #define V8_MACHINE_TYPE_H_ | 6 #define V8_MACHINE_TYPE_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| 11 #include "src/globals.h" | 11 #include "src/globals.h" |
| 12 #include "src/signature.h" | 12 #include "src/signature.h" |
| 13 #include "src/zone.h" | 13 #include "src/zone.h" |
| 14 | 14 |
| 15 namespace v8 { | 15 namespace v8 { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 enum class MachineRepresentation : uint8_t { | 18 enum class MachineRepresentation : uint8_t { |
| 19 kNone, | 19 kNone, |
| 20 kBit, | 20 kBit, |
| 21 kWord8, | 21 kWord8, |
| 22 kWord16, | 22 kWord16, |
| 23 kWord32, | 23 kWord32, |
| 24 kWord64, | 24 kWord64, |
| 25 kFloat32, | 25 kFloat32, |
| 26 kFloat64, // must follow kFloat32 | 26 kFloat64, // must follow kFloat32 |
| 27 kSimd128, // must follow kFloat64 | 27 kSimd128, // must follow kFloat64 |
| 28 kTaggedSigned, |
| 29 kTaggedPointer, |
| 28 kTagged | 30 kTagged |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 const char* MachineReprToString(MachineRepresentation); | 33 const char* MachineReprToString(MachineRepresentation); |
| 32 | 34 |
| 33 enum class MachineSemantic : uint8_t { | 35 enum class MachineSemantic : uint8_t { |
| 34 kNone, | 36 kNone, |
| 35 kBool, | 37 kBool, |
| 36 kInt32, | 38 kInt32, |
| 37 kUint32, | 39 kUint32, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 case MachineRepresentation::kWord16: | 223 case MachineRepresentation::kWord16: |
| 222 return 1; | 224 return 1; |
| 223 case MachineRepresentation::kWord32: | 225 case MachineRepresentation::kWord32: |
| 224 case MachineRepresentation::kFloat32: | 226 case MachineRepresentation::kFloat32: |
| 225 return 2; | 227 return 2; |
| 226 case MachineRepresentation::kWord64: | 228 case MachineRepresentation::kWord64: |
| 227 case MachineRepresentation::kFloat64: | 229 case MachineRepresentation::kFloat64: |
| 228 return 3; | 230 return 3; |
| 229 case MachineRepresentation::kSimd128: | 231 case MachineRepresentation::kSimd128: |
| 230 return 4; | 232 return 4; |
| 233 case MachineRepresentation::kTaggedSigned: |
| 234 case MachineRepresentation::kTaggedPointer: |
| 231 case MachineRepresentation::kTagged: | 235 case MachineRepresentation::kTagged: |
| 232 return kPointerSizeLog2; | 236 return kPointerSizeLog2; |
| 233 default: | 237 default: |
| 234 break; | 238 break; |
| 235 } | 239 } |
| 236 UNREACHABLE(); | 240 UNREACHABLE(); |
| 237 return -1; | 241 return -1; |
| 238 } | 242 } |
| 239 | 243 |
| 240 typedef Signature<MachineType> MachineSignature; | 244 typedef Signature<MachineType> MachineSignature; |
| 241 | 245 |
| 242 } // namespace internal | 246 } // namespace internal |
| 243 } // namespace v8 | 247 } // namespace v8 |
| 244 | 248 |
| 245 #endif // V8_MACHINE_TYPE_H_ | 249 #endif // V8_MACHINE_TYPE_H_ |
| OLD | NEW |