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

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: 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
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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 Asm->vadds(getDest(), getSrc(0), getSrc(1), CondARM32::AL); 609 Asm->vadds(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
610 break; 610 break;
611 case IceType_f64: 611 case IceType_f64:
612 Asm->vaddd(getDest(), getSrc(0), getSrc(1), CondARM32::AL); 612 Asm->vaddd(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
613 break; 613 break;
614 } 614 }
615 if (Asm->needsTextFixup()) 615 if (Asm->needsTextFixup())
616 emitUsingTextFixup(Func); 616 emitUsingTextFixup(Func);
617 } 617 }
618 618
619 template <> void InstARM32Vmul::emitIAS(const Cfg *Func) const {
620 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
621 const Variable *Dest = getDest();
622 switch (Dest->getType()) {
623 default:
624 // TODO(kschimpf) Figure if more cases are needed.
625 Asm->setNeedsTextFixup();
626 break;
627 case IceType_f32:
628 Asm->vmuls(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
629 break;
630 case IceType_f64:
631 Asm->vmuld(getDest(), getSrc(0), getSrc(1), CondARM32::AL);
632 break;
633 }
634 assert(!Asm->needsTextFixup());
635 }
636
619 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) 637 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget)
620 : InstARM32(Func, InstARM32::Call, 1, Dest) { 638 : InstARM32(Func, InstARM32::Call, 1, Dest) {
621 HasSideEffects = true; 639 HasSideEffects = true;
622 addSource(CallTarget); 640 addSource(CallTarget);
623 } 641 }
624 642
625 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target) 643 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target)
626 : InstARM32(Func, InstARM32::Label, 0, nullptr), 644 : InstARM32(Func, InstARM32::Label, 0, nullptr),
627 Number(Target->makeNextLabelNumber()) {} 645 Number(Target->makeNextLabelNumber()) {}
628 646
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 2189
2172 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2190 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2173 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2191 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2174 2192
2175 template class InstARM32CmpLike<InstARM32::Cmn>; 2193 template class InstARM32CmpLike<InstARM32::Cmn>;
2176 template class InstARM32CmpLike<InstARM32::Cmp>; 2194 template class InstARM32CmpLike<InstARM32::Cmp>;
2177 template class InstARM32CmpLike<InstARM32::Tst>; 2195 template class InstARM32CmpLike<InstARM32::Tst>;
2178 2196
2179 } // end of namespace ARM32 2197 } // end of namespace ARM32
2180 } // end of namespace Ice 2198 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698