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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1697263007: Add fabs(<4 x float>) to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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') | src/IceTargetLoweringARM32.cpp » ('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 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after
2457 Str << ", "; 2457 Str << ", ";
2458 getSrc(0)->emit(Func); 2458 getSrc(0)->emit(Func);
2459 } 2459 }
2460 2460
2461 void InstARM32Vabs::emitIAS(const Cfg *Func) const { 2461 void InstARM32Vabs::emitIAS(const Cfg *Func) const {
2462 assert(getSrcSize() == 1); 2462 assert(getSrcSize() == 1);
2463 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 2463 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
2464 const Variable *Dest = getDest(); 2464 const Variable *Dest = getDest();
2465 switch (Dest->getType()) { 2465 switch (Dest->getType()) {
2466 default: 2466 default:
2467 // TODO(kschimpf): Implement vector fabs. 2467 llvm::report_fatal_error("fabs not defined on type " +
2468 Asm->setNeedsTextFixup(); 2468 typeIceString(Dest->getType()));
2469 break;
2470 case IceType_f32: 2469 case IceType_f32:
2471 Asm->vabss(Dest, getSrc(0), getPredicate()); 2470 Asm->vabss(Dest, getSrc(0), getPredicate());
2472 break; 2471 break;
2473 case IceType_f64: 2472 case IceType_f64:
2474 Asm->vabsd(Dest, getSrc(0), getPredicate()); 2473 Asm->vabsd(Dest, getSrc(0), getPredicate());
2475 break; 2474 break;
2475 case IceType_v4f32:
2476 assert(CondARM32::isUnconditional(getPredicate()) &&
2477 "fabs must be unconditional");
2478 Asm->vabsq(Dest, getSrc(0));
2476 } 2479 }
2477 if (Asm->needsTextFixup()) 2480 assert(!Asm->needsTextFixup());
2478 emitUsingTextFixup(Func);
2479 } 2481 }
2480 2482
2481 void InstARM32Vabs::dump(const Cfg *Func) const { 2483 void InstARM32Vabs::dump(const Cfg *Func) const {
2482 if (!BuildDefs::dump()) 2484 if (!BuildDefs::dump())
2483 return; 2485 return;
2484 Ostream &Str = Func->getContext()->getStrDump(); 2486 Ostream &Str = Func->getContext()->getStrDump();
2485 dumpDest(Func); 2487 dumpDest(Func);
2486 Str << " = vabs" << getPredicate() << getVecWidthString(getSrc(0)->getType()); 2488 Str << " = vabs" << getPredicate() << getVecWidthString(getSrc(0)->getType());
2487 } 2489 }
2488 2490
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2776 2778
2777 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2779 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2778 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2780 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2779 2781
2780 template class InstARM32CmpLike<InstARM32::Cmn>; 2782 template class InstARM32CmpLike<InstARM32::Cmn>;
2781 template class InstARM32CmpLike<InstARM32::Cmp>; 2783 template class InstARM32CmpLike<InstARM32::Cmp>;
2782 template class InstARM32CmpLike<InstARM32::Tst>; 2784 template class InstARM32CmpLike<InstARM32::Tst>;
2783 2785
2784 } // end of namespace ARM32 2786 } // end of namespace ARM32
2785 } // end of namespace Ice 2787 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698