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/IceInstMIPS32.cpp

Issue 2143243003: SubZero: Correct parenthesis for mem operands with labels in MIPS32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « src/IceInstMIPS32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstMIPS32.cpp
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp
index 31c83449209ac64c83c54fac6a3ad19ab668b414..31f76ef0c07330bc434226606faf0bfe70378389 100644
--- a/src/IceInstMIPS32.cpp
+++ b/src/IceInstMIPS32.cpp
@@ -281,7 +281,9 @@ void OperandMIPS32Mem::emit(const Cfg *Func) const {
Ostream &Str = Func->getContext()->getStrEmit();
Operand *Offset = getOffset();
if (auto *CR = llvm::dyn_cast<ConstantRelocatable>(Offset)) {
+ Str << "(";
CR->emitWithoutPrefix(Func->getTarget());
+ Str << ")";
} else
Offset->emit(Func);
Str << "(";
« no previous file with comments | « src/IceInstMIPS32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698