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

Unified Diff: src/IceInstARM32.cpp

Issue 1665263003: Subzero. ARM32. Nonsfi. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: git pull 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 side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698