OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |