Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: src/IceInstARM32.cpp

Issue 1642303002: Add the VMLS instruction to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix comment in test. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmls.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 659
660 template <> void InstARM32Vmla::emitIAS(const Cfg *Func) const { 660 template <> void InstARM32Vmla::emitIAS(const Cfg *Func) const {
661 // Note: Dest == getSrc(0) for four address FP instructions. 661 // Note: Dest == getSrc(0) for four address FP instructions.
662 assert(getSrcSize() == 3); 662 assert(getSrcSize() == 3);
663 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 663 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
664 const Variable *Dest = getDest(); 664 const Variable *Dest = getDest();
665 switch (Dest->getType()) { 665 switch (Dest->getType()) {
666 default: 666 default:
667 // TODO(kschimpf) Figure out how vector operations apply. 667 // TODO(kschimpf) Figure out how vector operations apply.
668 emitUsingTextFixup(Func); 668 emitUsingTextFixup(Func);
669 break; 669 return;
670 case IceType_f32: 670 case IceType_f32:
671 Asm->vmlas(getDest(), getSrc(1), getSrc(2), CondARM32::AL); 671 Asm->vmlas(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
672 assert(!Asm->needsTextFixup()); 672 assert(!Asm->needsTextFixup());
673 break; 673 return;
674 case IceType_f64: 674 case IceType_f64:
675 Asm->vmlad(getDest(), getSrc(1), getSrc(2), CondARM32::AL); 675 Asm->vmlad(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
676 assert(!Asm->needsTextFixup()); 676 assert(!Asm->needsTextFixup());
677 break; 677 return;
678 } 678 }
679 } 679 }
680 680
681 template <> void InstARM32Vmls::emitIAS(const Cfg *Func) const {
682 // Note: Dest == getSrc(0) for four address FP instructions.
683 assert(getSrcSize() == 3);
684 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
685 const Variable *Dest = getDest();
686 switch (Dest->getType()) {
687 default:
688 // TODO(kschimpf) Figure out how vector operations apply.
689 emitUsingTextFixup(Func);
690 return;
691 case IceType_f32:
692 Asm->vmlss(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
693 assert(!Asm->needsTextFixup());
694 return;
695 case IceType_f64:
696 Asm->vmlsd(getDest(), getSrc(1), getSrc(2), CondARM32::AL);
697 assert(!Asm->needsTextFixup());
698 return;
699 }
700 }
701
681 template <> void InstARM32Vorr::emitIAS(const Cfg *Func) const { 702 template <> void InstARM32Vorr::emitIAS(const Cfg *Func) const {
682 // TODO(kschimpf): add support for these instructions 703 // TODO(kschimpf): add support for these instructions
683 emitUsingTextFixup(Func); 704 emitUsingTextFixup(Func);
684 } 705 }
685 706
686 template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const { 707 template <> void InstARM32Vsub::emitIAS(const Cfg *Func) const {
687 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 708 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
688 const Variable *Dest = getDest(); 709 const Variable *Dest = getDest();
689 switch (Dest->getType()) { 710 switch (Dest->getType()) {
690 default: 711 default:
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 2422
2402 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2423 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2403 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2424 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2404 2425
2405 template class InstARM32CmpLike<InstARM32::Cmn>; 2426 template class InstARM32CmpLike<InstARM32::Cmn>;
2406 template class InstARM32CmpLike<InstARM32::Cmp>; 2427 template class InstARM32CmpLike<InstARM32::Cmp>;
2407 template class InstARM32CmpLike<InstARM32::Tst>; 2428 template class InstARM32CmpLike<InstARM32::Tst>;
2408 2429
2409 } // end of namespace ARM32 2430 } // end of namespace ARM32
2410 } // end of namespace Ice 2431 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmls.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698