OLD | NEW |
---|---|
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 Loading... | |
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; } | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:28
len -> length
bbudge
2016/12/10 21:33:04
Done.
| |
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 Loading... | |
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); | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:28
in other instructions like vmovl the size qualifie
bbudge
2016/12/10 21:33:04
Done.
| |
1352 void vdup(const QwNeonRegister dst, const SwVfpRegister src); | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:28
this is a special case of vdup.size dst, src[index
bbudge
2016/12/10 21:33:04
This is enough for Wasm, so I'll leave it as is.
| |
1353 | |
1354 void vcvt_f32_s32(const QwNeonRegister dst, const QwNeonRegister src); | |
1355 void vcvt_f32_u32(const QwNeonRegister dst, const QwNeonRegister src); | |
1356 void vcvt_s32_f32(const QwNeonRegister dst, const QwNeonRegister src); | |
1357 void vcvt_u32_f32(const QwNeonRegister dst, const QwNeonRegister src); | |
1358 | |
1335 void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2); | 1359 void veor(DwVfpRegister dst, DwVfpRegister src1, DwVfpRegister src2); |
1336 void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2); | 1360 void veor(QwNeonRegister dst, QwNeonRegister src1, QwNeonRegister src2); |
1361 void vadd(const QwNeonRegister dst, const QwNeonRegister src1, | |
1362 const QwNeonRegister src2); | |
1363 void vadd(const QwNeonRegister dst, const QwNeonRegister src1, | |
1364 const QwNeonRegister src2, NeonSize size); | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:28
how about having the size as the first
bbudge
2016/12/10 21:33:04
Done.
| |
1365 void vsub(const QwNeonRegister dst, const QwNeonRegister src1, | |
1366 const QwNeonRegister src2); | |
1367 void vsub(const QwNeonRegister dst, const QwNeonRegister src1, | |
1368 const QwNeonRegister src2, NeonSize size); | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:27
ditto
bbudge
2016/12/10 21:33:04
Done.
| |
1369 void vtst(const QwNeonRegister dst, const QwNeonRegister src1, | |
1370 const QwNeonRegister src2, NeonSize size); | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:28
ditto
bbudge
2016/12/10 21:33:04
Done.
| |
1371 void vceq(const QwNeonRegister dst, const QwNeonRegister src1, | |
1372 const QwNeonRegister src2, NeonSize size); | |
Rodolph Perfetta (ARM)
2016/12/08 18:08:28
ditto
bbudge
2016/12/10 21:33:04
Done.
| |
1373 void vbsl(const QwNeonRegister dst, const QwNeonRegister src1, | |
1374 const QwNeonRegister src2); | |
1375 void vtbl(const DwVfpRegister dst, const NeonListOperand& list, | |
1376 const DwVfpRegister index); | |
1377 void vtbx(const DwVfpRegister dst, const NeonListOperand& list, | |
1378 const DwVfpRegister index); | |
1337 | 1379 |
1338 // Pseudo instructions | 1380 // Pseudo instructions |
1339 | 1381 |
1340 // Different nop operations are used by the code generator to detect certain | 1382 // Different nop operations are used by the code generator to detect certain |
1341 // states of the generated code. | 1383 // states of the generated code. |
1342 enum NopMarkerTypes { | 1384 enum NopMarkerTypes { |
1343 NON_MARKING_NOP = 0, | 1385 NON_MARKING_NOP = 0, |
1344 DEBUG_BREAK_NOP, | 1386 DEBUG_BREAK_NOP, |
1345 // IC markers. | 1387 // IC markers. |
1346 PROPERTY_ACCESS_INLINED, | 1388 PROPERTY_ACCESS_INLINED, |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1732 explicit EnsureSpace(Assembler* assembler) { | 1774 explicit EnsureSpace(Assembler* assembler) { |
1733 assembler->CheckBuffer(); | 1775 assembler->CheckBuffer(); |
1734 } | 1776 } |
1735 }; | 1777 }; |
1736 | 1778 |
1737 | 1779 |
1738 } // namespace internal | 1780 } // namespace internal |
1739 } // namespace v8 | 1781 } // namespace v8 |
1740 | 1782 |
1741 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1783 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |