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 1214863019: Followup to previous MIPS commit: implement dump(), rebase more. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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 af6aaf123067b3ac2a713a80e6bd842f2d0a7031..e38680699ddcf8f7abd2923f3989b71266ad0aeb 100644
--- a/src/IceInstMIPS32.cpp
+++ b/src/IceInstMIPS32.cpp
@@ -24,6 +24,10 @@
namespace Ice {
+const char *InstMIPS32::getWidthString(Type Ty) {
+ (void)Ty;
+ return "TBD";
+}
InstMIPS32Ret::InstMIPS32Ret(Cfg *Func, Variable *RA, Variable *Source)
: InstMIPS32(Func, InstMIPS32::Ret, Source ? 2 : 1, nullptr) {
@@ -32,8 +36,18 @@ InstMIPS32Ret::InstMIPS32Ret(Cfg *Func, Variable *RA, Variable *Source)
addSource(Source);
}
+// ======================== Dump routines ======================== //
+
+void InstMIPS32::dump(const Cfg *Func) const {
+ if (!BuildDefs::dump())
+ return;
+ Ostream &Str = Func->getContext()->getStrDump();
+ Str << "[MIPS32] ";
+ Inst::dump(Func);
+}
+
void InstMIPS32Ret::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
assert(getSrcSize() > 0);
Variable *RA = llvm::cast<Variable>(getSrc(0));
@@ -52,7 +66,7 @@ void InstMIPS32Ret::emitIAS(const Cfg *Func) const {
}
void InstMIPS32Ret::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = (getSrcSize() == 1 ? IceType_void : getSrc(0)->getType());
« 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