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

Side by Side Diff: src/arm/assembler-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
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/assembler-arm.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 633
634 Register rn_; // base 634 Register rn_; // base
635 Register rm_; // register increment 635 Register rm_; // register increment
636 int align_; 636 int align_;
637 }; 637 };
638 638
639 639
640 // Class NeonListOperand represents a list of NEON registers 640 // Class NeonListOperand represents a list of NEON registers
641 class NeonListOperand BASE_EMBEDDED { 641 class NeonListOperand BASE_EMBEDDED {
642 public: 642 public:
643 explicit NeonListOperand(DoubleRegister base, int registers_count = 1); 643 explicit NeonListOperand(DoubleRegister base, int register_count = 1)
644 : base_(base), register_count_(register_count) {}
645 explicit NeonListOperand(QwNeonRegister q_reg)
646 : base_(q_reg.low()), register_count_(2) {}
644 DoubleRegister base() const { return base_; } 647 DoubleRegister base() const { return base_; }
645 NeonListType type() const { return type_; } 648 int register_count() { return register_count_; }
649 int len() const { return register_count_ - 1; }
650 NeonListType type() const {
651 switch (register_count_) {
652 default: UNREACHABLE();
653 // Fall through.
654 case 1: return nlt_1;
655 case 2: return nlt_2;
656 case 3: return nlt_3;
657 case 4: return nlt_4;
658 }
659 }
646 private: 660 private:
647 DoubleRegister base_; 661 DoubleRegister base_;
648 NeonListType type_; 662 int register_count_;
649 }; 663 };
650 664
651 665
652 struct VmovIndex { 666 struct VmovIndex {
653 unsigned char index; 667 unsigned char index;
654 }; 668 };
655 const VmovIndex VmovIndexLo = { 0 }; 669 const VmovIndex VmovIndexLo = { 0 };
656 const VmovIndex VmovIndexHi = { 1 }; 670 const VmovIndex VmovIndexHi = { 1 };
657 671
658 class Assembler : public AssemblerBase { 672 class Assembler : public AssemblerBase {
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 // All these APIs support D0 to D31 and Q0 to Q15. 1337 // All these APIs support D0 to D31 and Q0 to Q15.
1324 void vld1(NeonSize size, 1338 void vld1(NeonSize size,
1325 const NeonListOperand& dst, 1339 const NeonListOperand& dst,
1326 const NeonMemOperand& src); 1340 const NeonMemOperand& src);
1327 void vst1(NeonSize size, 1341 void vst1(NeonSize size,
1328 const NeonListOperand& src, 1342 const NeonListOperand& src,
1329 const NeonMemOperand& dst); 1343 const NeonMemOperand& dst);
1330 void vmovl(NeonDataType dt, QwNeonRegister dst, DwVfpRegister src); 1344 void vmovl(NeonDataType dt, QwNeonRegister dst, DwVfpRegister src);
1331 1345
1332 void vmov(const QwNeonRegister dst, const QwNeonRegister src); 1346 void vmov(const QwNeonRegister dst, const QwNeonRegister src);
1347 void vmvn(const QwNeonRegister dst, const QwNeonRegister src);
1333 void vswp(DwVfpRegister dst, DwVfpRegister src); 1348 void vswp(DwVfpRegister dst, DwVfpRegister src);
1334 void vswp(QwNeonRegister dst, QwNeonRegister src); 1349 void vswp(QwNeonRegister dst, QwNeonRegister src);
1350 // vdup conditional execution isn't supported.
1351 void vdup(const QwNeonRegister dst, const Register src, NeonSize size);
1352 void vdup(const QwNeonRegister dst, const SwVfpRegister src);
1353
1354 // Float 'to' or 'from' arguments are specified by NeonOtherDataType.
1355 void vcvt(const QwNeonRegister dst, const QwNeonRegister src,
1356 NeonDataType from, NeonDataType to);
1357
1335 void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2); 1358 void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2);
1336 void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2); 1359 void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
1360 void vadd(const QwNeonRegister dst, const QwNeonRegister src1,
1361 const QwNeonRegister src2);
1362 void vadd(const QwNeonRegister dst, const QwNeonRegister src1,
1363 const QwNeonRegister src2, NeonSize size);
1364 void vsub(const QwNeonRegister dst, const QwNeonRegister src1,
1365 const QwNeonRegister src2);
1366 void vsub(const QwNeonRegister dst, const QwNeonRegister src1,
1367 const QwNeonRegister src2, NeonSize size);
1368 void vtst(const QwNeonRegister dst, const QwNeonRegister src1,
1369 const QwNeonRegister src2, NeonSize size);
1370 void vceq(const QwNeonRegister dst, const QwNeonRegister src1,
1371 const QwNeonRegister src2, NeonSize size);
1372 void vbsl(const QwNeonRegister dst, const QwNeonRegister src1,
1373 const QwNeonRegister src2);
1374 void vtbl(const DwVfpRegister dst, const NeonListOperand& list,
1375 const DwVfpRegister index);
1376 void vtbx(const DwVfpRegister dst, const NeonListOperand& list,
1377 const DwVfpRegister index);
1337 1378
1338 // Pseudo instructions 1379 // Pseudo instructions
1339 1380
1340 // Different nop operations are used by the code generator to detect certain 1381 // Different nop operations are used by the code generator to detect certain
1341 // states of the generated code. 1382 // states of the generated code.
1342 enum NopMarkerTypes { 1383 enum NopMarkerTypes {
1343 NON_MARKING_NOP = 0, 1384 NON_MARKING_NOP = 0,
1344 DEBUG_BREAK_NOP, 1385 DEBUG_BREAK_NOP,
1345 // IC markers. 1386 // IC markers.
1346 PROPERTY_ACCESS_INLINED, 1387 PROPERTY_ACCESS_INLINED,
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 explicit EnsureSpace(Assembler* assembler) { 1773 explicit EnsureSpace(Assembler* assembler) {
1733 assembler->CheckBuffer(); 1774 assembler->CheckBuffer();
1734 } 1775 }
1735 }; 1776 };
1736 1777
1737 1778
1738 } // namespace internal 1779 } // namespace internal
1739 } // namespace v8 1780 } // namespace v8
1740 1781
1741 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1782 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/assembler-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698