| 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 {
|
|
|