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

Unified Diff: src/IceInstARM32.cpp

Issue 1424923005: Add workaround to allow testing of ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. 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
Index: src/IceInstARM32.cpp
diff --git a/src/IceInstARM32.cpp b/src/IceInstARM32.cpp
index a5edfc95d84670dc3443ff44e1638bccd7dac4ec..4d8bccfbb0289b61acae88d084648e959574853b 100644
--- a/src/IceInstARM32.cpp
+++ b/src/IceInstARM32.cpp
@@ -757,7 +757,8 @@ void InstARM32Mov::emit(const Cfg *Func) const {
}
void InstARM32Mov::emitIAS(const Cfg *Func) const {
- (void)Func;
+ if (!Func->getContext()->getFlags().getAllowUnsafeIas())
+ return emitUsingTextFixup(Func);
assert(!(isMultiDest() && isMultiSource()) && "Invalid vmov type.");
ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
if (!(isMultiDest() || isMultiSource())) {
@@ -810,6 +811,8 @@ void InstARM32Br::emit(const Cfg *Func) const {
}
void InstARM32Br::emitIAS(const Cfg *Func) const {
+ if (!Func->getContext()->getFlags().getAllowUnsafeIas())
+ return emitUsingTextFixup(Func);
ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
if (Label) {
Asm->b(Asm->getOrCreateLocalLabel(Label->getNumber()), getPredicate());
@@ -895,7 +898,7 @@ void InstARM32Label::emit(const Cfg *Func) const {
void InstARM32Label::emitIAS(const Cfg *Func) const {
ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
- Asm->bindLocalLabel(Number);
+ Asm->bindLocalLabel(Func, this, Number);
if (Asm->needsTextFixup())
emitUsingTextFixup(Func);
}
@@ -991,6 +994,8 @@ 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);
ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
Asm->movw(getDest(), getSrc(0), getPredicate());
@@ -1017,6 +1022,8 @@ 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);
ARM32::AssemblerARM32 *Asm = Func->getAssembler<ARM32::AssemblerARM32>();
Asm->movt(getDest(), getSrc(1), getPredicate());
« src/IceClFlags.h ('K') | « src/IceClFlags.cpp ('k') | tests_lit/assembler/arm32/bic.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698