Index: src/IceInstARM32.cpp |
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp |
index d2cd6efbc4464922b84384e59acc82274ba63336..fab53210bc89f8f3dc28d91be886b4ca3f5c68df 100644 |
--- a/src/IceInstARM32.cpp |
+++ b/src/IceInstARM32.cpp |
@@ -789,7 +789,7 @@ void InstARM32Call::emit(const Cfg *Func) const { |
// This shouldn't happen (typically have to copy the full 32-bits to a |
// register and do an indirect jump). |
llvm::report_fatal_error("ARM32Call to ConstantInteger32"); |
- } else if (const auto CallTarget = |
+ } else if (const auto *CallTarget = |
llvm::dyn_cast<ConstantRelocatable>(getCallTarget())) { |
// Calls only have 24-bits, but the linker should insert veneers to extend |
// the range if needed. |
@@ -881,6 +881,11 @@ void InstARM32TwoAddrGPR<K>::emitIAS(const Cfg *Func) const { |
emitUsingTextFixup(Func); |
} |
+template <InstARM32::InstKindARM32 K, bool Nws> |
+void InstARM32UnaryopGPR<K, Nws>::emitIAS(const Cfg *Func) const { |
+ emitUsingTextFixup(Func); |
+} |
+ |
template <> void InstARM32Movw::emit(const Cfg *Func) const { |
if (!BuildDefs::dump()) |
return; |
@@ -890,7 +895,7 @@ template <> void InstARM32Movw::emit(const Cfg *Func) const { |
getDest()->emit(Func); |
Str << ", "; |
Constant *Src0 = llvm::cast<Constant>(getSrc(0)); |
- if (auto CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { |
+ if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { |
Str << "#:lower16:"; |
CR->emitWithoutPrefix(Func->getTarget()); |
} else { |
@@ -898,6 +903,12 @@ template <> void InstARM32Movw::emit(const Cfg *Func) const { |
} |
} |
+template <> void InstARM32Movw::emitIAS(const Cfg *Func) const { |
+ assert(getSrcSize() == 1); |
+ ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
+ Asm->movw(getDest(), getSrc(0), getPredicate()); |
+} |
+ |
template <> void InstARM32Movt::emit(const Cfg *Func) const { |
if (!BuildDefs::dump()) |
return; |
@@ -908,7 +919,7 @@ template <> void InstARM32Movt::emit(const Cfg *Func) const { |
Str << "\t" << Opcode << getPredicate() << "\t"; |
Dest->emit(Func); |
Str << ", "; |
- if (auto CR = llvm::dyn_cast<ConstantRelocatable>(Src1)) { |
+ if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src1)) { |
Str << "#:upper16:"; |
CR->emitWithoutPrefix(Func->getTarget()); |
} else { |
@@ -916,6 +927,12 @@ template <> void InstARM32Movt::emit(const Cfg *Func) const { |
} |
} |
+template <> void InstARM32Movt::emitIAS(const Cfg *Func) const { |
+ assert(getSrcSize() == 2); |
+ ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
+ Asm->movt(getDest(), getSrc(1), getPredicate()); |
+} |
+ |
void InstARM32Pop::emit(const Cfg *Func) const { |
// TODO(jpp): Improve FP register save/restore. |
if (!BuildDefs::dump()) |
@@ -1454,4 +1471,13 @@ template class InstARM32ThreeAddrFP<InstARM32::Vsub>; |
template class InstARM32TwoAddrGPR<InstARM32::Movt>; |
+template class InstARM32UnaryopGPR<InstARM32::Movw, false>; |
+template class InstARM32UnaryopGPR<InstARM32::Clz, false>; |
+template class InstARM32UnaryopGPR<InstARM32::Mvn, false>; |
+template class InstARM32UnaryopGPR<InstARM32::Rbit, false>; |
+template class InstARM32UnaryopGPR<InstARM32::Rev, false>; |
+template class InstARM32UnaryopGPR<InstARM32::Sxt, true>; |
+template class InstARM32UnaryopGPR<InstARM32::Uxt, true>; |
+template class InstARM32UnaryopFP<InstARM32::Vsqrt>; |
+ |
} // end of namespace Ice |