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

Unified Diff: src/IceInstMIPS32.cpp

Issue 2289043002: [SubZero] Implement lowerSwitch for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 4 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/IceInstMIPS32.cpp
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp
index c61fc9f4c13f1f7bba69c2cd902de9f9f6aad1dd..23f79ad314f45270b7c2251cd46db2fdeb2eb35c 100644
--- a/src/IceInstMIPS32.cpp
+++ b/src/IceInstMIPS32.cpp
@@ -430,8 +430,11 @@ void InstMIPS32Br::emit(const Cfg *Func) const {
Ostream &Str = Func->getContext()->getStrEmit();
Str << "\t"
"b" << InstMIPS32CondAttributes[Predicate].EmitString << "\t";
- if (Label) {
- Str << Label->getLabelName();
+ if (Label != nullptr) {
+ getSrc(0)->emit(Func);
+ Str << ", ";
+ getSrc(1)->emit(Func);
+ Str << ", " << Label->getLabelName();
} else {
if (isUnconditionalBranch()) {
Str << getTargetFalse()->getAsmName();
@@ -475,8 +478,11 @@ void InstMIPS32Br::dump(const Cfg *Func) const {
Str << "\t"
"b" << InstMIPS32CondAttributes[Predicate].EmitString << "\t";
- if (Label) {
- Str << Label->getLabelName();
+ if (Label != nullptr) {
+ getSrc(0)->dump(Func);
+ Str << ", ";
+ getSrc(1)->dump(Func);
+ Str << ", " << Label->getLabelName();
} else {
if (isUnconditionalBranch()) {
Str << getTargetFalse()->getAsmName();

Powered by Google App Engine
This is Rietveld 408576698