OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_ARM_CONSTANTS_ARM_H_ | 5 #ifndef V8_ARM_CONSTANTS_ARM_H_ |
6 #define V8_ARM_CONSTANTS_ARM_H_ | 6 #define V8_ARM_CONSTANTS_ARM_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 kBlockAddrModeMask = (8|4|1) << 21 | 317 kBlockAddrModeMask = (8|4|1) << 21 |
318 }; | 318 }; |
319 | 319 |
320 | 320 |
321 // Coprocessor load/store operand size. | 321 // Coprocessor load/store operand size. |
322 enum LFlag { | 322 enum LFlag { |
323 Long = 1 << 22, // Long load/store coprocessor. | 323 Long = 1 << 22, // Long load/store coprocessor. |
324 Short = 0 << 22 // Short load/store coprocessor. | 324 Short = 0 << 22 // Short load/store coprocessor. |
325 }; | 325 }; |
326 | 326 |
| 327 // Neon sizes. |
| 328 enum NeonSize { Neon8 = 0x0, Neon16 = 0x1, Neon32 = 0x2, Neon64 = 0x3 }; |
327 | 329 |
328 // NEON data type | 330 // NEON data type |
329 enum NeonDataType { | 331 enum NeonDataType { |
330 NeonS8 = 0, | 332 NeonS8 = 0, |
331 NeonS16 = 1, | 333 NeonS16 = 1, |
332 NeonS32 = 2, | 334 NeonS32 = 2, |
333 // Gap to make it easier to extract U and size. | 335 // Gap to make it easier to extract U and size. |
334 NeonU8 = 4, | 336 NeonU8 = 4, |
335 NeonU16 = 5, | 337 NeonU16 = 5, |
336 NeonU32 = 6 | 338 NeonU32 = 6 |
337 }; | 339 }; |
338 | 340 |
339 inline int NeonU(NeonDataType dt) { return static_cast<int>(dt) >> 2; } | 341 inline int NeonU(NeonDataType dt) { return static_cast<int>(dt) >> 2; } |
340 inline int NeonSz(NeonDataType dt) { return static_cast<int>(dt) & 0x3; } | 342 inline int NeonSz(NeonDataType dt) { return static_cast<int>(dt) & 0x3; } |
341 | 343 |
| 344 // Convert sizes to data types (U bit is clear). |
| 345 inline NeonDataType NeonSizeToDatatype(NeonSize size) { |
| 346 return static_cast<NeonDataType>(size); |
| 347 } |
| 348 |
342 enum NeonListType { | 349 enum NeonListType { |
343 nlt_1 = 0x7, | 350 nlt_1 = 0x7, |
344 nlt_2 = 0xA, | 351 nlt_2 = 0xA, |
345 nlt_3 = 0x6, | 352 nlt_3 = 0x6, |
346 nlt_4 = 0x2 | 353 nlt_4 = 0x2 |
347 }; | 354 }; |
348 | 355 |
349 enum NeonSize { | |
350 Neon8 = 0x0, | |
351 Neon16 = 0x1, | |
352 Neon32 = 0x2, | |
353 Neon64 = 0x3 | |
354 }; | |
355 | |
356 // ----------------------------------------------------------------------------- | 356 // ----------------------------------------------------------------------------- |
357 // Supervisor Call (svc) specific support. | 357 // Supervisor Call (svc) specific support. |
358 | 358 |
359 // Special Software Interrupt codes when used in the presence of the ARM | 359 // Special Software Interrupt codes when used in the presence of the ARM |
360 // simulator. | 360 // simulator. |
361 // svc (formerly swi) provides a 24bit immediate value. Use bits 22:0 for | 361 // svc (formerly swi) provides a 24bit immediate value. Use bits 22:0 for |
362 // standard SoftwareInterrupCode. Bit 23 is reserved for the stop feature. | 362 // standard SoftwareInterrupCode. Bit 23 is reserved for the stop feature. |
363 enum SoftwareInterruptCodes { | 363 enum SoftwareInterruptCodes { |
364 // transition to C code | 364 // transition to C code |
365 kCallRtRedirected = 0x10, | 365 kCallRtRedirected = 0x10, |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 | 724 |
725 private: | 725 private: |
726 static const char* names_[kNumVFPRegisters]; | 726 static const char* names_[kNumVFPRegisters]; |
727 }; | 727 }; |
728 | 728 |
729 | 729 |
730 } // namespace internal | 730 } // namespace internal |
731 } // namespace v8 | 731 } // namespace v8 |
732 | 732 |
733 #endif // V8_ARM_CONSTANTS_ARM_H_ | 733 #endif // V8_ARM_CONSTANTS_ARM_H_ |
OLD | NEW |