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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 721 } |
722 | 722 |
723 template <> void InstARM32Vorr::emitIAS(const Cfg *Func) const { | 723 template <> void InstARM32Vorr::emitIAS(const Cfg *Func) const { |
724 // TODO(kschimpf): add support for these instructions | 724 // TODO(kschimpf): add support for these instructions |
725 emitUsingTextFixup(Func); | 725 emitUsingTextFixup(Func); |
726 } | 726 } |
727 | 727 |
728 template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const { | 728 template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const { |
729 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 729 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
730 const Variable *Dest = getDest(); | 730 const Variable *Dest = getDest(); |
731 switch (Dest->getType()) { | 731 Type DestTy = Dest->getType(); |
732 default: | 732 switch (DestTy) { |
733 // TODO(kschimpf) Figure if more cases are needed. | 733 case IceType_void: |
734 emitUsingTextFixup(Func); | 734 case IceType_i1: |
| 735 case IceType_i8: |
| 736 case IceType_i16: |
| 737 case IceType_i32: |
| 738 case IceType_i64: |
| 739 case IceType_v4i1: |
| 740 case IceType_v8i1: |
| 741 case IceType_v16i1: |
| 742 case IceType_NUM: |
| 743 llvm::report_fatal_error("Vsub not defined on type " + |
| 744 std::string(typeString(DestTy))); |
| 745 break; |
| 746 case IceType_v16i8: |
| 747 case IceType_v8i16: |
| 748 case IceType_v4i32: |
| 749 Asm->vsubqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1)); |
| 750 break; |
| 751 case IceType_v4f32: |
| 752 Asm->vsubqf(Dest, getSrc(0), getSrc(1)); |
735 break; | 753 break; |
736 case IceType_f32: | 754 case IceType_f32: |
737 Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 755 Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL); |
738 assert(!Asm->needsTextFixup()); | |
739 break; | 756 break; |
740 case IceType_f64: | 757 case IceType_f64: |
741 Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 758 Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); |
742 assert(!Asm->needsTextFixup()); | |
743 break; | 759 break; |
744 } | 760 } |
| 761 assert(!Asm->needsTextFixup()); |
745 } | 762 } |
746 | 763 |
747 template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const { | 764 template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const { |
748 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 765 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
749 const Variable *Dest = getDest(); | 766 const Variable *Dest = getDest(); |
750 switch (Dest->getType()) { | 767 switch (Dest->getType()) { |
751 default: | 768 default: |
752 // TODO(kschimpf) Figure if more cases are needed. | 769 // TODO(kschimpf) Figure if more cases are needed. |
753 emitUsingTextFixup(Func); | 770 emitUsingTextFixup(Func); |
754 break; | 771 break; |
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2476 | 2493 |
2477 template class InstARM32FourAddrGPR<InstARM32::Mla>; | 2494 template class InstARM32FourAddrGPR<InstARM32::Mla>; |
2478 template class InstARM32FourAddrGPR<InstARM32::Mls>; | 2495 template class InstARM32FourAddrGPR<InstARM32::Mls>; |
2479 | 2496 |
2480 template class InstARM32CmpLike<InstARM32::Cmn>; | 2497 template class InstARM32CmpLike<InstARM32::Cmn>; |
2481 template class InstARM32CmpLike<InstARM32::Cmp>; | 2498 template class InstARM32CmpLike<InstARM32::Cmp>; |
2482 template class InstARM32CmpLike<InstARM32::Tst>; | 2499 template class InstARM32CmpLike<InstARM32::Tst>; |
2483 | 2500 |
2484 } // end of namespace ARM32 | 2501 } // end of namespace ARM32 |
2485 } // end of namespace Ice | 2502 } // end of namespace Ice |
OLD | NEW |