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

Side by Side Diff: src/IceInstARM32.cpp

Issue 1654483002: Fix nits in committed CL's for the integrated ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 | « no previous file | tests_lit/assembler/arm32/trap.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 OstreamLocker L(Ctx); 103 OstreamLocker L(Ctx);
104 Ostream &OldStr = Ctx->getStrEmit(); 104 Ostream &OldStr = Ctx->getStrEmit();
105 Ctx->setStrEmit(StrBuf); 105 Ctx->setStrEmit(StrBuf);
106 // Start counting instructions here, so that emit() methods don't 106 // Start counting instructions here, so that emit() methods don't
107 // need to call this for the first instruction. 107 // need to call this for the first instruction.
108 Asm->resetEmitTextSize(); 108 Asm->resetEmitTextSize();
109 Asm->incEmitTextSize(InstSize); 109 Asm->incEmitTextSize(InstSize);
110 emit(Func); 110 emit(Func);
111 Ctx->setStrEmit(OldStr); 111 Ctx->setStrEmit(OldStr);
112 if (Ctx->getFlags().getDisableHybridAssembly()) { 112 if (Ctx->getFlags().getDisableHybridAssembly()) {
113 llvm::errs() << "Can't assemble: " << StrBuf.str() << "\n"; 113 if (Ctx->getFlags().getSkipUnimplemented()) {
114 UnimplementedError(Ctx->getFlags()); 114 Asm->trap();
115 } else {
116 llvm::errs() << "Can't assemble: " << StrBuf.str() << "\n";
117 UnimplementedError(Ctx->getFlags());
118 }
115 return; 119 return;
116 } 120 }
117 Asm->emitTextInst(StrBuf.str(), Asm->getEmitTextSize()); 121 Asm->emitTextInst(StrBuf.str(), Asm->getEmitTextSize());
118 } 122 }
119 123
120 void InstARM32::emitIAS(const Cfg *Func) const { emitUsingTextFixup(Func); } 124 void InstARM32::emitIAS(const Cfg *Func) const { emitUsingTextFixup(Func); }
121 125
122 void InstARM32Pred::emitUnaryopGPR(const char *Opcode, 126 void InstARM32Pred::emitUnaryopGPR(const char *Opcode,
123 const InstARM32Pred *Inst, const Cfg *Func, 127 const InstARM32Pred *Inst, const Cfg *Func,
124 bool NeedsWidthSuffix) { 128 bool NeedsWidthSuffix) {
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); 1698 auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
1695 const Operand *Dest = getDest(); 1699 const Operand *Dest = getDest();
1696 switch (Dest->getType()) { 1700 switch (Dest->getType()) {
1697 case IceType_f32: 1701 case IceType_f32:
1698 Asm->vsqrts(Dest, getSrc(0), getPredicate()); 1702 Asm->vsqrts(Dest, getSrc(0), getPredicate());
1699 break; 1703 break;
1700 case IceType_f64: 1704 case IceType_f64:
1701 Asm->vsqrtd(Dest, getSrc(0), getPredicate()); 1705 Asm->vsqrtd(Dest, getSrc(0), getPredicate());
1702 break; 1706 break;
1703 default: 1707 default:
1704 llvm::report_fatal_error("Vqrt of non-floating type"); 1708 llvm::report_fatal_error("Vsqrt of non-floating type");
1705 } 1709 }
1706 if (Asm->needsTextFixup()) 1710 if (Asm->needsTextFixup())
1707 emitUsingTextFixup(Func); 1711 emitUsingTextFixup(Func);
1708 } 1712 }
1709 1713
1710 const char *InstARM32Pop::getGPROpcode() const { return "pop"; } 1714 const char *InstARM32Pop::getGPROpcode() const { return "pop"; }
1711 1715
1712 const char *InstARM32Pop::getSRegOpcode() const { return "vpop"; } 1716 const char *InstARM32Pop::getSRegOpcode() const { return "vpop"; }
1713 1717
1714 Variable *InstARM32Pop::getStackReg(SizeT Index) const { return Dests[Index]; } 1718 Variable *InstARM32Pop::getStackReg(SizeT Index) const { return Dests[Index]; }
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 2460
2457 template class InstARM32FourAddrGPR<InstARM32::Mla>; 2461 template class InstARM32FourAddrGPR<InstARM32::Mla>;
2458 template class InstARM32FourAddrGPR<InstARM32::Mls>; 2462 template class InstARM32FourAddrGPR<InstARM32::Mls>;
2459 2463
2460 template class InstARM32CmpLike<InstARM32::Cmn>; 2464 template class InstARM32CmpLike<InstARM32::Cmn>;
2461 template class InstARM32CmpLike<InstARM32::Cmp>; 2465 template class InstARM32CmpLike<InstARM32::Cmp>;
2462 template class InstARM32CmpLike<InstARM32::Tst>; 2466 template class InstARM32CmpLike<InstARM32::Tst>;
2463 2467
2464 } // end of namespace ARM32 2468 } // end of namespace ARM32
2465 } // end of namespace Ice 2469 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | tests_lit/assembler/arm32/trap.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698