Chromium Code Reviews| 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 } | 634 } |
| 635 | 635 |
| 636 template <> void InstARM32Veor::emitIAS(const Cfg *Func) const { | 636 template <> void InstARM32Veor::emitIAS(const Cfg *Func) const { |
| 637 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 637 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 638 const Variable *Dest = getDest(); | 638 const Variable *Dest = getDest(); |
| 639 assert(Dest->getType() == IceType_f64); | 639 assert(Dest->getType() == IceType_f64); |
| 640 Asm->veord(Dest, getSrc(0), getSrc(1)); | 640 Asm->veord(Dest, getSrc(0), getSrc(1)); |
| 641 assert(!Asm->needsTextFixup()); | 641 assert(!Asm->needsTextFixup()); |
| 642 } | 642 } |
| 643 | 643 |
| 644 template <> void InstARM32Vmla::emitIAS(const Cfg *Func) const { | |
| 645 // Note: Dest == getSrc(0) for four address FP instructions. | |
| 646 assert(getSrcSize() == 3); | |
| 647 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | |
| 648 const Variable *Dest = getDest(); | |
| 649 switch (Dest->getType()) { | |
| 650 default: | |
| 651 // TODO(kschimpf) Figure out how vector operations apply. | |
| 652 Asm->setNeedsTextFixup(); | |
| 653 break; | |
| 654 case IceType_f32: | |
| 655 Asm->vmlas(getDest(), getSrc(1), getSrc(2), CondARM32::AL); | |
|
John
2016/01/26 19:13:15
perhaps
assert(!Asm->needsTextFixup());
here (an
Karl
2016/01/26 20:38:39
Done.
| |
| 656 break; | |
| 657 case IceType_f64: | |
| 658 Asm->vmlad(getDest(), getSrc(1), getSrc(2), CondARM32::AL); | |
| 659 break; | |
| 660 } | |
| 661 if (Asm->needsTextFixup()) | |
| 662 emitUsingTextFixup(Func); | |
| 663 } | |
| 664 | |
| 644 template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const { | 665 template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const { |
| 645 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); | 666 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
| 646 const Variable *Dest = getDest(); | 667 const Variable *Dest = getDest(); |
| 647 switch (Dest->getType()) { | 668 switch (Dest->getType()) { |
| 648 default: | 669 default: |
| 649 // TODO(kschimpf) Figure if more cases are needed. | 670 // TODO(kschimpf) Figure if more cases are needed. |
| 650 Asm->setNeedsTextFixup(); | 671 Asm->setNeedsTextFixup(); |
| 651 break; | 672 break; |
| 652 case IceType_f32: | 673 case IceType_f32: |
| 653 Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL); | 674 Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL); |
| (...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2303 | 2324 |
| 2304 template class InstARM32FourAddrGPR<InstARM32::Mla>; | 2325 template class InstARM32FourAddrGPR<InstARM32::Mla>; |
| 2305 template class InstARM32FourAddrGPR<InstARM32::Mls>; | 2326 template class InstARM32FourAddrGPR<InstARM32::Mls>; |
| 2306 | 2327 |
| 2307 template class InstARM32CmpLike<InstARM32::Cmn>; | 2328 template class InstARM32CmpLike<InstARM32::Cmn>; |
| 2308 template class InstARM32CmpLike<InstARM32::Cmp>; | 2329 template class InstARM32CmpLike<InstARM32::Cmp>; |
| 2309 template class InstARM32CmpLike<InstARM32::Tst>; | 2330 template class InstARM32CmpLike<InstARM32::Tst>; |
| 2310 | 2331 |
| 2311 } // end of namespace ARM32 | 2332 } // end of namespace ARM32 |
| 2312 } // end of namespace Ice | 2333 } // end of namespace Ice |
| OLD | NEW |