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 1430973003: Fix textual emission of label instructions in ARM assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove -unsafe-ias from lit tests that don't need it. Created 5 years, 1 month 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
« no previous file with comments | « no previous file | tests_lit/assembler/arm32/branch-simple.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index 94ea762bb97b3e8fb803852c1f3a563730983dd6..dd92097740f04133947d1280d63a062f65fe35e2 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -842,8 +842,6 @@ void InstARM32Br::emit(const Cfg *Func) const {
}
void InstARM32Br::emitIAS(const Cfg *Func) const {
- if (!Func->getContext()->getFlags().getAllowUnsafeIas())
- return emitUsingTextFixup(Func);
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
if (Label) {
Asm->b(Asm->getOrCreateLocalLabel(Label->getNumber()), getPredicate());
@@ -923,6 +921,10 @@ void InstARM32Call::dump(const Cfg *Func) const {
void InstARM32Label::emit(const Cfg *Func) const {
if (!BuildDefs::dump())
return;
+ // A label is not really an instruction. Hence, we need to fix the
+ // emitted text size.
+ if (auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>())
+ Asm->decEmitTextSize(InstSize);
Ostream &Str = Func->getContext()->getStrEmit();
Str << getName(Func) << ":";
}
@@ -1025,8 +1027,6 @@ template <> void InstARM32Movw::emit(const Cfg *Func) const {
}
template <> void InstARM32Movw::emitIAS(const Cfg *Func) const {
- if (!Func->getContext()->getFlags().getAllowUnsafeIas())
- return emitUsingTextFixup(Func);
assert(getSrcSize() == 1);
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
Asm->movw(getDest(), getSrc(0), getPredicate());
@@ -1053,8 +1053,6 @@ template <> void InstARM32Movt::emit(const Cfg *Func) const {
}
template <> void InstARM32Movt::emitIAS(const Cfg *Func) const {
- if (!Func->getContext()->getFlags().getAllowUnsafeIas())
- return emitUsingTextFixup(Func);
assert(getSrcSize() == 2);
auto *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
Asm->movt(getDest(), getSrc(1), getPredicate());
« no previous file with comments | « no previous file | tests_lit/assembler/arm32/branch-simple.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698