OLD | NEW |
---|---|
1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// | 1 //===- subzero/src/IceInstARM32.cpp - ARM32 instruction implementation ----===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
626 break; | 626 break; |
627 case IceType_v16i8: | 627 case IceType_v16i8: |
628 case IceType_v8i16: | 628 case IceType_v8i16: |
629 case IceType_v4i32: | 629 case IceType_v4i32: |
630 Asm->vaddqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1)); | 630 Asm->vaddqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1)); |
631 break; | 631 break; |
632 case IceType_v4f32: | 632 case IceType_v4f32: |
633 Asm->vaddqf(Dest, getSrc(0), getSrc(1)); | 633 Asm->vaddqf(Dest, getSrc(0), getSrc(1)); |
634 break; | 634 break; |
635 case IceType_f32: | 635 case IceType_f32: |
636 Asm->vadds(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 636 Asm->vadds(Dest, getSrc(0), getSrc(1), CondARM32::AL); |
637 break; | 637 break; |
638 case IceType_f64: | 638 case IceType_f64: |
639 Asm->vaddd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 639 Asm->vaddd(Dest, getSrc(0), getSrc(1), CondARM32::AL); |
640 break; | 640 break; |
641 } | 641 } |
642 assert(!Asm->needsTextFixup()); | 642 assert(!Asm->needsTextFixup()); |
643 } | 643 } |
644 | 644 |
645 template <> void InstARM32Vand::emitIAS(const Cfg *Func) const { | 645 template <> void InstARM32Vand::emitIAS(const Cfg *Func) const { |
646 // TODO(kschimpf): add support for these instructions | 646 // TODO(kschimpf): add support for these instructions |
647 emitUsingTextFixup(Func); | 647 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
648 const Variable *Dest = getDest(); | |
649 Type DestTy = Dest->getType(); | |
Jim Stichnoth
2016/02/02 18:46:44
const
or just use "switch (Dest->getType())" like
Karl
2016/02/02 19:25:37
Done.
| |
650 switch (DestTy) { | |
651 case IceType_void: | |
John
2016/02/02 18:46:28
defaut:?
Karl
2016/02/02 19:25:37
Done.
| |
652 case IceType_i1: | |
653 case IceType_i8: | |
654 case IceType_i16: | |
655 case IceType_i32: | |
656 case IceType_i64: | |
657 case IceType_f32: | |
658 case IceType_f64: | |
659 case IceType_v4f32: | |
660 case IceType_NUM: | |
661 llvm::report_fatal_error("Vand not defined on type " + | |
662 std::string(typeString(DestTy))); | |
Jim Stichnoth
2016/02/02 18:46:44
You're getting enough instances of std::string(typ
Karl
2016/02/02 19:25:37
Done.
| |
663 return; | |
664 case IceType_v4i1: | |
665 case IceType_v8i1: | |
666 case IceType_v16i1: | |
667 case IceType_v16i8: | |
668 case IceType_v8i16: | |
669 case IceType_v4i32: | |
670 Asm->vandq(Dest, getSrc(0), getSrc(1)); | |
671 } | |
672 assert(!Asm->needsTextFixup()); | |
648 } | 673 } |
649 | 674 |
650 template <> void InstARM32Vdiv::emitIAS(const Cfg *Func) const { | 675 template <> void InstARM32Vdiv::emitIAS(const Cfg *Func) const { |
651 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 676 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
652 const Variable *Dest = getDest(); | 677 const Variable *Dest = getDest(); |
653 switch (Dest->getType()) { | 678 switch (Dest->getType()) { |
654 default: | 679 default: |
655 // TODO(kschimpf) Figure if more cases are needed. | 680 // TODO(kschimpf) Figure if more cases are needed. |
656 Asm->setNeedsTextFixup(); | 681 Asm->setNeedsTextFixup(); |
657 break; | 682 break; |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2476 | 2501 |
2477 template class InstARM32FourAddrGPR<InstARM32::Mla>; | 2502 template class InstARM32FourAddrGPR<InstARM32::Mla>; |
2478 template class InstARM32FourAddrGPR<InstARM32::Mls>; | 2503 template class InstARM32FourAddrGPR<InstARM32::Mls>; |
2479 | 2504 |
2480 template class InstARM32CmpLike<InstARM32::Cmn>; | 2505 template class InstARM32CmpLike<InstARM32::Cmn>; |
2481 template class InstARM32CmpLike<InstARM32::Cmp>; | 2506 template class InstARM32CmpLike<InstARM32::Cmp>; |
2482 template class InstARM32CmpLike<InstARM32::Tst>; | 2507 template class InstARM32CmpLike<InstARM32::Tst>; |
2483 | 2508 |
2484 } // end of namespace ARM32 | 2509 } // end of namespace ARM32 |
2485 } // end of namespace Ice | 2510 } // end of namespace Ice |
OLD | NEW |