Index: src/IceInstARM32.cpp |
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp |
index e9b4f61331cc83eb67c56a05505ce43f91e7645b..9bc2cc0c1d76b2d2d42ddcc6f03e60fbaf89c710 100644 |
--- a/src/IceInstARM32.cpp |
+++ b/src/IceInstARM32.cpp |
@@ -1660,6 +1660,9 @@ void InstARM32Label::emit(const Cfg *Func) const { |
void InstARM32Label::emitIAS(const Cfg *Func) const { |
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>(); |
Asm->bindLocalLabel(Func, this, Number); |
+ if (OffsetReloc != nullptr) { |
+ Asm->bindRelocOffset(OffsetReloc); |
+ } |
if (Asm->needsTextFixup()) |
emitUsingTextFixup(Func); |
} |
@@ -1799,6 +1802,9 @@ template <> void InstARM32Movw::emit(const Cfg *Func) const { |
if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src0)) { |
Str << "#:lower16:"; |
CR->emitWithoutPrefix(Func->getTarget()); |
+ if (Func->getContext()->getFlags().getUseNonsfi()) { |
+ Str << " - ."; |
+ } |
} else { |
Src0->emit(Func); |
} |
@@ -1825,6 +1831,9 @@ template <> void InstARM32Movt::emit(const Cfg *Func) const { |
if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Src1)) { |
Str << "#:upper16:"; |
CR->emitWithoutPrefix(Func->getTarget()); |
+ if (Func->getContext()->getFlags().getUseNonsfi()) { |
+ Str << " - ."; |
+ } |
} else { |
Src1->emit(Func); |
} |