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

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

Issue 2546933002: [Turbofan] Add ARM NEON instructions for implementing SIMD. (Closed)
Patch Set: Fourth review comments. 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') | no next file with comments »
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 length() 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 void vmov(const SwVfpRegister dst, float imm); 1156 void vmov(const SwVfpRegister dst, float imm);
1143 void vmov(const DwVfpRegister dst, 1157 void vmov(const DwVfpRegister dst,
1144 double imm, 1158 double imm,
1145 const Register scratch = no_reg); 1159 const Register scratch = no_reg);
1146 void vmov(const SwVfpRegister dst, 1160 void vmov(const SwVfpRegister dst,
1147 const SwVfpRegister src, 1161 const SwVfpRegister src,
1148 const Condition cond = al); 1162 const Condition cond = al);
1149 void vmov(const DwVfpRegister dst, 1163 void vmov(const DwVfpRegister dst,
1150 const DwVfpRegister src, 1164 const DwVfpRegister src,
1151 const Condition cond = al); 1165 const Condition cond = al);
1166 // TODO(bbudge) Replace uses of these with the more general core register to
1167 // scalar register vmov's.
1152 void vmov(const DwVfpRegister dst, 1168 void vmov(const DwVfpRegister dst,
1153 const VmovIndex index, 1169 const VmovIndex index,
1154 const Register src, 1170 const Register src,
1155 const Condition cond = al); 1171 const Condition cond = al);
1156 void vmov(const Register dst, 1172 void vmov(const Register dst,
1157 const VmovIndex index, 1173 const VmovIndex index,
1158 const DwVfpRegister src, 1174 const DwVfpRegister src,
1159 const Condition cond = al); 1175 const Condition cond = al);
1160 void vmov(const DwVfpRegister dst, 1176 void vmov(const DwVfpRegister dst,
1161 const Register src1, 1177 const Register src1,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1338
1323 // All these APIs support D0 to D31 and Q0 to Q15. 1339 // All these APIs support D0 to D31 and Q0 to Q15.
1324 void vld1(NeonSize size, 1340 void vld1(NeonSize size,
1325 const NeonListOperand& dst, 1341 const NeonListOperand& dst,
1326 const NeonMemOperand& src); 1342 const NeonMemOperand& src);
1327 void vst1(NeonSize size, 1343 void vst1(NeonSize size,
1328 const NeonListOperand& src, 1344 const NeonListOperand& src,
1329 const NeonMemOperand& dst); 1345 const NeonMemOperand& dst);
1330 void vmovl(NeonDataType dt, QwNeonRegister dst, DwVfpRegister src); 1346 void vmovl(NeonDataType dt, QwNeonRegister dst, DwVfpRegister src);
1331 1347
1348 // Only unconditional core <-> scalar moves are currently supported.
1349 void vmov(NeonDataType dt, DwVfpRegister dst, int index, Register src);
1350 void vmov(NeonDataType dt, Register dst, DwVfpRegister src, int index);
1351
1332 void vmov(const QwNeonRegister dst, const QwNeonRegister src); 1352 void vmov(const QwNeonRegister dst, const QwNeonRegister src);
1353 void vmvn(const QwNeonRegister dst, const QwNeonRegister src);
1333 void vswp(DwVfpRegister dst, DwVfpRegister src); 1354 void vswp(DwVfpRegister dst, DwVfpRegister src);
1334 void vswp(QwNeonRegister dst, QwNeonRegister src); 1355 void vswp(QwNeonRegister dst, QwNeonRegister src);
1356 // vdup conditional execution isn't supported.
1357 void vdup(NeonSize size, const QwNeonRegister dst, const Register src);
1358 void vdup(const QwNeonRegister dst, const SwVfpRegister src);
1359
1360 void vcvt_f32_s32(const QwNeonRegister dst, const QwNeonRegister src);
1361 void vcvt_f32_u32(const QwNeonRegister dst, const QwNeonRegister src);
1362 void vcvt_s32_f32(const QwNeonRegister dst, const QwNeonRegister src);
1363 void vcvt_u32_f32(const QwNeonRegister dst, const QwNeonRegister src);
1364
1335 void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2); 1365 void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2);
1336 void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2); 1366 void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2);
1367 void vadd(const QwNeonRegister dst, const QwNeonRegister src1,
1368 const QwNeonRegister src2);
1369 void vadd(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
1370 const QwNeonRegister src2);
1371 void vsub(const QwNeonRegister dst, const QwNeonRegister src1,
1372 const QwNeonRegister src2);
1373 void vsub(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
1374 const QwNeonRegister src2);
1375 void vtst(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
1376 const QwNeonRegister src2);
1377 void vceq(NeonSize size, const QwNeonRegister dst, const QwNeonRegister src1,
1378 const QwNeonRegister src2);
1379 void vbsl(const QwNeonRegister dst, const QwNeonRegister src1,
1380 const QwNeonRegister src2);
1381 void vtbl(const DwVfpRegister dst, const NeonListOperand& list,
1382 const DwVfpRegister index);
1383 void vtbx(const DwVfpRegister dst, const NeonListOperand& list,
1384 const DwVfpRegister index);
1337 1385
1338 // Pseudo instructions 1386 // Pseudo instructions
1339 1387
1340 // Different nop operations are used by the code generator to detect certain 1388 // Different nop operations are used by the code generator to detect certain
1341 // states of the generated code. 1389 // states of the generated code.
1342 enum NopMarkerTypes { 1390 enum NopMarkerTypes {
1343 NON_MARKING_NOP = 0, 1391 NON_MARKING_NOP = 0,
1344 DEBUG_BREAK_NOP, 1392 DEBUG_BREAK_NOP,
1345 // IC markers. 1393 // IC markers.
1346 PROPERTY_ACCESS_INLINED, 1394 PROPERTY_ACCESS_INLINED,
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 explicit EnsureSpace(Assembler* assembler) { 1780 explicit EnsureSpace(Assembler* assembler) {
1733 assembler->CheckBuffer(); 1781 assembler->CheckBuffer();
1734 } 1782 }
1735 }; 1783 };
1736 1784
1737 1785
1738 } // namespace internal 1786 } // namespace internal
1739 } // namespace v8 1787 } // namespace v8
1740 1788
1741 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1789 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698