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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1570543002: Add VMULS and VMULD instructions to integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Show resolved merge conflicts. Created 4 years, 11 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/vmul.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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 case IceType_f32: 644 case IceType_f32:
645 Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL); 645 Asm->vsubs(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
646 break; 646 break;
647 case IceType_f64: 647 case IceType_f64:
648 Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); 648 Asm->vsubd(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
649 break; 649 break;
650 } 650 }
651 assert(!Asm->needsTextFixup()); 651 assert(!Asm->needsTextFixup());
652 } 652 }
653 653
654 template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const {
655 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
656 const Variable *Dest = getDest();
657 switch (Dest->getType()) {
658 default:
659 // TODO(kschimpf) Figure if more cases are needed.
660 Asm->setNeedsTextFixup();
661 break;
662 case IceType_f32:
663 Asm->vmuls(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
664 break;
665 case IceType_f64:
666 Asm->vmuld(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
667 break;
668 }
669 assert(!Asm->needsTextFixup());
670 }
671
654 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) 672 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget)
655 : InstARM32(Func, InstARM32::Call, 1, Dest) { 673 : InstARM32(Func, InstARM32::Call, 1, Dest) {
656 HasSideEffects = true; 674 HasSideEffects = true;
657 addSource(CallTarget); 675 addSource(CallTarget);
658 } 676 }
659 677
660 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target) 678 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target)
661 : InstARM32(Func, InstARM32::Label, 0, nullptr), 679 : InstARM32(Func, InstARM32::Label, 0, nullptr),
662 Number(Target->makeNextLabelNumber()) {} 680 Number(Target->makeNextLabelNumber()) {}
663 681
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 2224
2207 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2225 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2208 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2226 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2209 2227
2210 template class InstARM32CmpLike<InstARM32::Cmn>; 2228 template class InstARM32CmpLike<InstARM32::Cmn>;
2211 template class InstARM32CmpLike<InstARM32::Cmp>; 2229 template class InstARM32CmpLike<InstARM32::Cmp>;
2212 template class InstARM32CmpLike<InstARM32::Tst>; 2230 template class InstARM32CmpLike<InstARM32::Tst>;
2213 2231
2214 } // end of namespace ARM32 2232 } // end of namespace ARM32
2215 } // end of namespace Ice 2233 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | tests_lit/assembler/arm32/vmul.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698