| 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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 } | 614 } |
| 615 | 615 |
| 616 template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const { | 616 template <> void InstARM32Vadd::emitIAS(const Cfg *Func) const { |
| 617 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 617 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 618 const Variable *Dest = getDest(); | 618 const Variable *Dest = getDest(); |
| 619 Type DestTy = Dest->getType(); | 619 Type DestTy = Dest->getType(); |
| 620 switch (DestTy) { | 620 switch (DestTy) { |
| 621 default: | 621 default: |
| 622 llvm::report_fatal_error("Vadd not defined on type " + | 622 llvm::report_fatal_error("Vadd not defined on type " + |
| 623 typeIceString(DestTy)); | 623 typeIceString(DestTy)); |
| 624 break; | |
| 625 case IceType_v16i8: | 624 case IceType_v16i8: |
| 626 case IceType_v8i16: | 625 case IceType_v8i16: |
| 627 case IceType_v4i32: | 626 case IceType_v4i32: |
| 628 Asm->vaddqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1)); | 627 Asm->vaddqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1)); |
| 629 break; | 628 break; |
| 630 case IceType_v4f32: | 629 case IceType_v4f32: |
| 631 Asm->vaddqf(Dest, getSrc(0), getSrc(1)); | 630 Asm->vaddqf(Dest, getSrc(0), getSrc(1)); |
| 632 break; | 631 break; |
| 633 case IceType_f32: | 632 case IceType_f32: |
| 634 Asm->vadds(Dest, getSrc(0), getSrc(1), CondARM32::AL); | 633 Asm->vadds(Dest, getSrc(0), getSrc(1), CondARM32::AL); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 case IceType_f64: | 770 case IceType_f64: |
| 772 Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 771 Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); |
| 773 break; | 772 break; |
| 774 } | 773 } |
| 775 assert(!Asm->needsTextFixup()); | 774 assert(!Asm->needsTextFixup()); |
| 776 } | 775 } |
| 777 | 776 |
| 778 template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const { | 777 template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const { |
| 779 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 778 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 780 const Variable *Dest = getDest(); | 779 const Variable *Dest = getDest(); |
| 781 switch (Dest->getType()) { | 780 const Type DestTy = Dest->getType(); |
| 781 switch (DestTy) { |
| 782 default: | 782 default: |
| 783 // TODO(kschimpf) Figure if more cases are needed. | 783 llvm::report_fatal_error("Vmul not defined on type " + |
| 784 emitUsingTextFixup(Func); | 784 typeIceString(DestTy)); |
| 785 return; | 785 |
| 786 case IceType_v16i8: |
| 787 case IceType_v8i16: |
| 788 case IceType_v4i32: |
| 789 Asm->vmulqi(typeElementType(DestTy), Dest, getSrc(0), getSrc(1)); |
| 790 break; |
| 791 case IceType_v4f32: |
| 792 Asm->vmulqf(Dest, getSrc(0), getSrc(1)); |
| 793 break; |
| 786 case IceType_f32: | 794 case IceType_f32: |
| 787 Asm->vmuls(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 795 Asm->vmuls(Dest, getSrc(0), getSrc(1), CondARM32::AL); |
| 788 assert(!Asm->needsTextFixup()); | 796 break; |
| 789 return; | |
| 790 case IceType_f64: | 797 case IceType_f64: |
| 791 Asm->vmuld(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 798 Asm->vmuld(Dest, getSrc(0), getSrc(1), CondARM32::AL); |
| 792 assert(!Asm->needsTextFixup()); | 799 break; |
| 793 return; | |
| 794 } | 800 } |
| 801 assert(!Asm->needsTextFixup()); |
| 795 } | 802 } |
| 796 | 803 |
| 797 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) | 804 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) |
| 798 : InstARM32(Func, InstARM32::Call, 1, Dest) { | 805 : InstARM32(Func, InstARM32::Call, 1, Dest) { |
| 799 HasSideEffects = true; | 806 HasSideEffects = true; |
| 800 addSource(CallTarget); | 807 addSource(CallTarget); |
| 801 } | 808 } |
| 802 | 809 |
| 803 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target) | 810 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target) |
| 804 : InstARM32(Func, InstARM32::Label, 0, nullptr), | 811 : InstARM32(Func, InstARM32::Label, 0, nullptr), |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2526 | 2533 |
| 2527 template class InstARM32FourAddrGPR<InstARM32::Mla>; | 2534 template class InstARM32FourAddrGPR<InstARM32::Mla>; |
| 2528 template class InstARM32FourAddrGPR<InstARM32::Mls>; | 2535 template class InstARM32FourAddrGPR<InstARM32::Mls>; |
| 2529 | 2536 |
| 2530 template class InstARM32CmpLike<InstARM32::Cmn>; | 2537 template class InstARM32CmpLike<InstARM32::Cmn>; |
| 2531 template class InstARM32CmpLike<InstARM32::Cmp>; | 2538 template class InstARM32CmpLike<InstARM32::Cmp>; |
| 2532 template class InstARM32CmpLike<InstARM32::Tst>; | 2539 template class InstARM32CmpLike<InstARM32::Tst>; |
| 2533 | 2540 |
| 2534 } // end of namespace ARM32 | 2541 } // end of namespace ARM32 |
| 2535 } // end of namespace Ice | 2542 } // end of namespace Ice |
| OLD | NEW |