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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1657193003: Add FABS intrinsic to the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Format. 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/IceInstARM32.h ('k') | tests_lit/assembler/arm32/vabs.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 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2214 Ostream &Str = Func->getContext()->getStrEmit(); 2214 Ostream &Str = Func->getContext()->getStrEmit();
2215 assert(getSrcSize() == 1); 2215 assert(getSrcSize() == 1);
2216 Str << "\t" 2216 Str << "\t"
2217 "vabs" << getPredicate() << getVecWidthString(getSrc(0)->getType()) 2217 "vabs" << getPredicate() << getVecWidthString(getSrc(0)->getType())
2218 << "\t"; 2218 << "\t";
2219 getDest()->emit(Func); 2219 getDest()->emit(Func);
2220 Str << ", "; 2220 Str << ", ";
2221 getSrc(0)->emit(Func); 2221 getSrc(0)->emit(Func);
2222 } 2222 }
2223 2223
2224 void InstARM32Vabs::emitIAS(const Cfg *Func) const {
2225 assert(getSrcSize() == 1);
2226 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
2227 const Variable *Dest = getDest();
2228 switch (Dest->getType()) {
2229 default:
2230 // TODO(kschimpf): Implement vector fabs.
2231 Asm->setNeedsTextFixup();
2232 break;
2233 case IceType_f32:
2234 Asm->vabss(Dest, getSrc(0), getPredicate());
2235 break;
2236 case IceType_f64:
2237 Asm->vabsd(Dest, getSrc(0), getPredicate());
2238 break;
2239 }
2240 if (Asm->needsTextFixup())
2241 emitUsingTextFixup(Func);
2242 }
2243
2224 void InstARM32Vabs::dump(const Cfg *Func) const { 2244 void InstARM32Vabs::dump(const Cfg *Func) const {
2225 if (!BuildDefs::dump()) 2245 if (!BuildDefs::dump())
2226 return; 2246 return;
2227 Ostream &Str = Func->getContext()->getStrDump(); 2247 Ostream &Str = Func->getContext()->getStrDump();
2228 dumpDest(Func); 2248 dumpDest(Func);
2229 Str << " = vabs" << getPredicate() << getVecWidthString(getSrc(0)->getType()); 2249 Str << " = vabs" << getPredicate() << getVecWidthString(getSrc(0)->getType());
2230 } 2250 }
2231 2251
2232 void InstARM32Dmb::emit(const Cfg *Func) const { 2252 void InstARM32Dmb::emit(const Cfg *Func) const {
2233 if (!BuildDefs::dump()) 2253 if (!BuildDefs::dump())
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 2519
2500 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2520 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2501 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2521 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2502 2522
2503 template class InstARM32CmpLike<InstARM32::Cmn>; 2523 template class InstARM32CmpLike<InstARM32::Cmn>;
2504 template class InstARM32CmpLike<InstARM32::Cmp>; 2524 template class InstARM32CmpLike<InstARM32::Cmp>;
2505 template class InstARM32CmpLike<InstARM32::Tst>; 2525 template class InstARM32CmpLike<InstARM32::Tst>;
2506 2526
2507 } // end of namespace ARM32 2527 } // end of namespace ARM32
2508 } // end of namespace Ice 2528 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstARM32.h ('k') | tests_lit/assembler/arm32/vabs.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698