Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: src/arm/constants-arm.h

Issue 2523933002: [Turbofan] Add ARM support for simd128 moves and swaps. (Closed)
Patch Set: Rebase. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/disasm-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 kStopCode = 1 << 23 367 kStopCode = 1 << 23
368 }; 368 };
369 const uint32_t kStopCodeMask = kStopCode - 1; 369 const uint32_t kStopCodeMask = kStopCode - 1;
370 const uint32_t kMaxStopCode = kStopCode - 1; 370 const uint32_t kMaxStopCode = kStopCode - 1;
371 const int32_t kDefaultStopCode = -1; 371 const int32_t kDefaultStopCode = -1;
372 372
373 373
374 // Type of VFP register. Determines register encoding. 374 // Type of VFP register. Determines register encoding.
375 enum VFPRegPrecision { 375 enum VFPRegPrecision {
376 kSinglePrecision = 0, 376 kSinglePrecision = 0,
377 kDoublePrecision = 1 377 kDoublePrecision = 1,
378 kSimd128Precision = 2
378 }; 379 };
379 380
380
381 // VFP FPSCR constants. 381 // VFP FPSCR constants.
382 enum VFPConversionMode { 382 enum VFPConversionMode {
383 kFPSCRRounding = 0, 383 kFPSCRRounding = 0,
384 kDefaultRoundToZero = 1 384 kDefaultRoundToZero = 1
385 }; 385 };
386 386
387 // This mask does not include the "inexact" or "input denormal" cumulative 387 // This mask does not include the "inexact" or "input denormal" cumulative
388 // exceptions flags, because we usually don't want to check for it. 388 // exceptions flags, because we usually don't want to check for it.
389 const uint32_t kVFPExceptionMask = 0xf; 389 const uint32_t kVFPExceptionMask = 0xf;
390 const uint32_t kVFPInvalidOpExceptionBit = 1 << 0; 390 const uint32_t kVFPInvalidOpExceptionBit = 1 << 0;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 667
668 668
669 private: 669 private:
670 // Join split register codes, depending on single or double precision. 670 // Join split register codes, depending on single or double precision.
671 // four_bit is the position of the least-significant bit of the four 671 // four_bit is the position of the least-significant bit of the four
672 // bit specifier. one_bit is the position of the additional single bit 672 // bit specifier. one_bit is the position of the additional single bit
673 // specifier. 673 // specifier.
674 inline int VFPGlueRegValue(VFPRegPrecision pre, int four_bit, int one_bit) { 674 inline int VFPGlueRegValue(VFPRegPrecision pre, int four_bit, int one_bit) {
675 if (pre == kSinglePrecision) { 675 if (pre == kSinglePrecision) {
676 return (Bits(four_bit + 3, four_bit) << 1) | Bit(one_bit); 676 return (Bits(four_bit + 3, four_bit) << 1) | Bit(one_bit);
677 } else {
678 int reg_num = (Bit(one_bit) << 4) | Bits(four_bit + 3, four_bit);
679 if (pre == kDoublePrecision) {
680 return reg_num;
681 }
682 DCHECK_EQ(kSimd128Precision, pre);
683 DCHECK_EQ(reg_num & 1, 0);
684 return reg_num / 2;
677 } 685 }
678 return (Bit(one_bit) << 4) | Bits(four_bit + 3, four_bit);
679 } 686 }
680 687
681 // We need to prevent the creation of instances of class Instruction. 688 // We need to prevent the creation of instances of class Instruction.
682 DISALLOW_IMPLICIT_CONSTRUCTORS(Instruction); 689 DISALLOW_IMPLICIT_CONSTRUCTORS(Instruction);
683 }; 690 };
684 691
685 692
686 // Helper functions for converting between register numbers and names. 693 // Helper functions for converting between register numbers and names.
687 class Registers { 694 class Registers {
688 public: 695 public:
(...skipping 26 matching lines...) Expand all
715 722
716 private: 723 private:
717 static const char* names_[kNumVFPRegisters]; 724 static const char* names_[kNumVFPRegisters];
718 }; 725 };
719 726
720 727
721 } // namespace internal 728 } // namespace internal
722 } // namespace v8 729 } // namespace v8
723 730
724 #endif // V8_ARM_CONSTANTS_ARM_H_ 731 #endif // V8_ARM_CONSTANTS_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/disasm-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698