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

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

Issue 2546933002: [Turbofan] Add ARM NEON instructions for implementing SIMD. (Closed)
Patch Set: Don't use temporary FP regs in tests. 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
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 U = 1 << 23, // Positive (or negative) offset/index. 183 U = 1 << 23, // Positive (or negative) offset/index.
184 P = 1 << 24, // Offset/pre-indexed addressing (or post-indexed addressing). 184 P = 1 << 24, // Offset/pre-indexed addressing (or post-indexed addressing).
185 I = 1 << 25, // Immediate shifter operand (or not). 185 I = 1 << 25, // Immediate shifter operand (or not).
186 B0 = 1 << 0, 186 B0 = 1 << 0,
187 B4 = 1 << 4, 187 B4 = 1 << 4,
188 B5 = 1 << 5, 188 B5 = 1 << 5,
189 B6 = 1 << 6, 189 B6 = 1 << 6,
190 B7 = 1 << 7, 190 B7 = 1 << 7,
191 B8 = 1 << 8, 191 B8 = 1 << 8,
192 B9 = 1 << 9, 192 B9 = 1 << 9,
193 B10 = 1 << 10,
193 B12 = 1 << 12, 194 B12 = 1 << 12,
194 B16 = 1 << 16, 195 B16 = 1 << 16,
195 B17 = 1 << 17, 196 B17 = 1 << 17,
196 B18 = 1 << 18, 197 B18 = 1 << 18,
197 B19 = 1 << 19, 198 B19 = 1 << 19,
198 B20 = 1 << 20, 199 B20 = 1 << 20,
199 B21 = 1 << 21, 200 B21 = 1 << 21,
200 B22 = 1 << 22, 201 B22 = 1 << 22,
201 B23 = 1 << 23, 202 B23 = 1 << 23,
202 B24 = 1 << 24, 203 B24 = 1 << 24,
203 B25 = 1 << 25, 204 B25 = 1 << 25,
204 B26 = 1 << 26, 205 B26 = 1 << 26,
205 B27 = 1 << 27, 206 B27 = 1 << 27,
206 B28 = 1 << 28, 207 B28 = 1 << 28,
207 208
208 // Instruction bit masks. 209 // Instruction bit masks.
209 kCondMask = 15 << 28, 210 kCondMask = 15 << 28,
210 kALUMask = 0x6f << 21, 211 kALUMask = 0x6f << 21,
211 kRdMask = 15 << 12, // In str instruction. 212 kRdMask = 15 << 12, // In str instruction.
212 kCoprocessorMask = 15 << 8, 213 kCoprocessorMask = 15 << 8,
213 kOpCodeMask = 15 << 21, // In data-processing instructions. 214 kOpCodeMask = 15 << 21, // In data-processing instructions.
214 kImm24Mask = (1 << 24) - 1, 215 kImm24Mask = (1 << 24) - 1,
215 kImm16Mask = (1 << 16) - 1, 216 kImm16Mask = (1 << 16) - 1,
216 kImm8Mask = (1 << 8) - 1, 217 kImm8Mask = (1 << 8) - 1,
217 kOff12Mask = (1 << 12) - 1, 218 kOff12Mask = (1 << 12) - 1,
218 kOff8Mask = (1 << 8) - 1 219 kOff8Mask = (1 << 8) - 1
219 }; 220 };
220 221
221
222 enum BarrierOption { 222 enum BarrierOption {
223 OSHLD = 0x1, 223 OSHLD = 0x1,
224 OSHST = 0x2, 224 OSHST = 0x2,
225 OSH = 0x3, 225 OSH = 0x3,
226 NSHLD = 0x5, 226 NSHLD = 0x5,
227 NSHST = 0x6, 227 NSHST = 0x6,
228 NSH = 0x7, 228 NSH = 0x7,
229 ISHLD = 0x9, 229 ISHLD = 0x9,
230 ISHST = 0xa, 230 ISHST = 0xa,
231 ISH = 0xb, 231 ISH = 0xb,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 327
328 // NEON data type 328 // NEON data type
329 enum NeonDataType { 329 enum NeonDataType {
330 NeonS8 = 0x1, // U = 0, imm3 = 0b001 330 NeonOtherDataType = 0,
331 NeonS16 = 0x2, // U = 0, imm3 = 0b010 331 NeonS8 = 0x1, // U = 0, imm3 = 0b001
332 NeonS32 = 0x4, // U = 0, imm3 = 0b100 332 NeonS16 = 0x2, // U = 0, imm3 = 0b010
333 NeonS32 = 0x4, // U = 0, imm3 = 0b100
333 NeonU8 = 1 << 24 | 0x1, // U = 1, imm3 = 0b001 334 NeonU8 = 1 << 24 | 0x1, // U = 1, imm3 = 0b001
334 NeonU16 = 1 << 24 | 0x2, // U = 1, imm3 = 0b010 335 NeonU16 = 1 << 24 | 0x2, // U = 1, imm3 = 0b010
335 NeonU32 = 1 << 24 | 0x4, // U = 1, imm3 = 0b100 336 NeonU32 = 1 << 24 | 0x4, // U = 1, imm3 = 0b100
336 NeonDataTypeSizeMask = 0x7, 337 NeonDataTypeSizeMask = 0x7,
337 NeonDataTypeUMask = 1 << 24 338 NeonDataTypeUMask = 1 << 24
338 }; 339 };
339 340
340 enum NeonListType { 341 enum NeonListType {
341 nlt_1 = 0x7, 342 nlt_1 = 0x7,
342 nlt_2 = 0xA, 343 nlt_2 = 0xA,
343 nlt_3 = 0x6, 344 nlt_3 = 0x6,
344 nlt_4 = 0x2 345 nlt_4 = 0x2
345 }; 346 };
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 // Instructions are read of out a code stream. The only way to get a 661 // Instructions are read of out a code stream. The only way to get a
661 // reference to an instruction is to convert a pointer. There is no way 662 // reference to an instruction is to convert a pointer. There is no way
662 // to allocate or create instances of class Instruction. 663 // to allocate or create instances of class Instruction.
663 // Use the At(pc) function to create references to Instruction. 664 // Use the At(pc) function to create references to Instruction.
664 static Instruction* At(byte* pc) { 665 static Instruction* At(byte* pc) {
665 return reinterpret_cast<Instruction*>(pc); 666 return reinterpret_cast<Instruction*>(pc);
666 } 667 }
667 668
668 669
669 private: 670 private:
670 // Join split register codes, depending on single or double precision. 671 // Join split register codes, depending on register precision.
671 // four_bit is the position of the least-significant bit of the four 672 // 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 673 // bit specifier. one_bit is the position of the additional single bit
673 // specifier. 674 // specifier.
674 inline int VFPGlueRegValue(VFPRegPrecision pre, int four_bit, int one_bit) { 675 inline int VFPGlueRegValue(VFPRegPrecision pre, int four_bit, int one_bit) {
675 if (pre == kSinglePrecision) { 676 if (pre == kSinglePrecision) {
676 return (Bits(four_bit + 3, four_bit) << 1) | Bit(one_bit); 677 return (Bits(four_bit + 3, four_bit) << 1) | Bit(one_bit);
677 } else { 678 } else {
678 int reg_num = (Bit(one_bit) << 4) | Bits(four_bit + 3, four_bit); 679 int reg_num = (Bit(one_bit) << 4) | Bits(four_bit + 3, four_bit);
679 if (pre == kDoublePrecision) { 680 if (pre == kDoublePrecision) {
680 return reg_num; 681 return reg_num;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 723
723 private: 724 private:
724 static const char* names_[kNumVFPRegisters]; 725 static const char* names_[kNumVFPRegisters];
725 }; 726 };
726 727
727 728
728 } // namespace internal 729 } // namespace internal
729 } // namespace v8 730 } // namespace v8
730 731
731 #endif // V8_ARM_CONSTANTS_ARM_H_ 732 #endif // V8_ARM_CONSTANTS_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698