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

Unified Diff: src/IceInstX8632.h

Issue 695993004: Subzero: Switch to AT&T asm syntax. I give up. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 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/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index b9868c07264d5b1b9edc6cad05353aa2c0cd0947..1216e1a6ee1fc4326b44a6210c1bbe46e4803409 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -263,6 +263,7 @@ public:
};
static const char *getWidthString(Type Ty);
+ static const char *getFldString(Type Ty);
void dump(const Cfg *Func) const override;
protected:
@@ -514,10 +515,15 @@ public:
void emit(const Cfg *Func) const override {
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
- Str << "\t" << Opcode << "\t";
- getDest()->emit(Func);
- Str << ", ";
+ Type SrcTy = getSrc(0)->getType();
+ Type DestTy = getDest()->getType();
+ Str << "\t" << Opcode << getWidthString(SrcTy);
+ if (SrcTy != DestTy)
+ Str << getWidthString(DestTy);
+ Str << "\t";
getSrc(0)->emit(Func);
+ Str << ", ";
+ getDest()->emit(Func);
}
void emitIAS(const Cfg *Func) const override {
assert(getSrcSize() == 1);
@@ -562,9 +568,9 @@ public:
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
Str << "\t" << Opcode << "\t";
- getDest()->emit(Func);
- Str << ", ";
getSrc(0)->emit(Func);
+ Str << ", ";
+ getDest()->emit(Func);
}
void emitIAS(const Cfg *Func) const override {
Type Ty = getDest()->getType();
@@ -780,11 +786,11 @@ public:
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3);
Str << "\t" << Opcode << "\t";
- getDest()->emit(Func);
+ getSrc(2)->emit(Func);
Str << ", ";
getSrc(1)->emit(Func);
Str << ", ";
- getSrc(2)->emit(Func);
+ getDest()->emit(Func);
}
void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override {
@@ -822,11 +828,11 @@ public:
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
Str << "\t" << Opcode << "\t";
- getDest()->emit(Func);
+ getSrc(1)->emit(Func);
Str << ", ";
getSrc(0)->emit(Func);
Str << ", ";
- getSrc(1)->emit(Func);
+ getDest()->emit(Func);
}
void emitIAS(const Cfg *Func) const override;
void dump(const Cfg *Func) const override {

Powered by Google App Engine
This is Rietveld 408576698