Index: src/IceInstX8632.h |
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h |
index 834e061374b28acc6c4e679c079eea49153f0cd6..fc1b3189de8f2f36277627d5cf40792c1fbfbb98 100644 |
--- a/src/IceInstX8632.h |
+++ b/src/IceInstX8632.h |
@@ -16,6 +16,7 @@ |
#ifndef SUBZERO_SRC_ICEINSTX8632_H |
#define SUBZERO_SRC_ICEINSTX8632_H |
+#include "assembler_ia32.h" |
#include "IceDefs.h" |
#include "IceInst.h" |
#include "IceInstX8632.def" |
@@ -71,6 +72,7 @@ public: |
Variable *getIndex() const { return Index; } |
uint16_t getShift() const { return Shift; } |
SegmentRegisters getSegmentRegister() const { return SegmentReg; } |
+ x86::Address convertToAsmAddress(IceString &SymbolicOffset) const; |
virtual void emit(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
@@ -228,6 +230,7 @@ public: |
static const char *getWidthString(Type Ty); |
virtual void emit(const Cfg *Func) const = 0; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
protected: |
@@ -372,6 +375,7 @@ public: |
} |
Operand *getCallTarget() const { return getSrc(0); } |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Call); } |
@@ -397,6 +401,7 @@ public: |
getSrc(0)->emit(Func); |
Str << "\n"; |
} |
+ virtual void emitIAS(const Cfg *Func) const { emit(Func); } |
virtual void dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
dumpDest(Func); |
@@ -434,6 +439,7 @@ public: |
getSrc(0)->emit(Func); |
Str << "\n"; |
} |
+ virtual void emitIAS(const Cfg *Func) const { emit(Func); } |
virtual void dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
dumpDest(Func); |
@@ -469,6 +475,7 @@ public: |
virtual void emit(const Cfg *Func) const { |
emitTwoAddress(Opcode, this, Func, ShiftHack); |
} |
+ virtual void emitIAS(const Cfg *Func) const { emit(Func); } |
virtual void dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
dumpDest(Func); |
@@ -508,6 +515,7 @@ public: |
getSrc(2)->emit(Func); |
Str << "\n"; |
} |
+ virtual void emitIAS(const Cfg *Func) const { emit(Func); } |
virtual void dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
dumpDest(Func); |
@@ -549,6 +557,7 @@ public: |
getSrc(1)->emit(Func); |
Str << "\n"; |
} |
+ virtual void emitIAS(const Cfg *Func) const { emit(Func); } |
virtual void dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
dumpDest(Func); |
@@ -586,6 +595,7 @@ public: |
return checkForRedundantAssign(getDest(), getSrc(0)); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const { emit(Func); } |
virtual void dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
Str << Opcode << "." << getDest()->getType() << " "; |
@@ -765,6 +775,7 @@ public: |
InstX8632Cmov(Func, Dest, Source, Cond); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Cmov); } |
@@ -794,6 +805,7 @@ public: |
InstX8632Cmpps(Func, Dest, Source, Condition); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Cmpps); } |
@@ -1032,6 +1044,7 @@ public: |
InstX8632Movsx(Func, Dest, Source); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Movsx); } |
@@ -1051,6 +1064,7 @@ public: |
InstX8632Movzx(Func, Dest, Source); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Movzx); } |
@@ -1071,6 +1085,7 @@ public: |
return new (Func->allocate<InstX8632Nop>()) InstX8632Nop(Func, Variant); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Nop); } |
@@ -1123,6 +1138,7 @@ public: |
return new (Func->allocate<InstX8632Pop>()) InstX8632Pop(Func, Dest); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Pop); } |
@@ -1162,6 +1178,7 @@ public: |
return new (Func->allocate<InstX8632Ret>()) InstX8632Ret(Func, Source); |
} |
virtual void emit(const Cfg *Func) const; |
+ virtual void emitIAS(const Cfg *Func) const; |
virtual void dump(const Cfg *Func) const; |
static bool classof(const Inst *Inst) { return isClassof(Inst, Ret); } |
@@ -1246,6 +1263,18 @@ template <> void InstX8632Psub::emit(const Cfg *Func) const; |
template <> void InstX8632Sqrtss::emit(const Cfg *Func) const; |
template <> void InstX8632Subss::emit(const Cfg *Func) const; |
+// Same with emitIAS() methods. |
+template <> void InstX8632Addps::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Addss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Cbwdq::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Divps::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Divss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Mulps::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Mulss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Sqrtss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Subps::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Subss::emitIAS(const Cfg *Func) const; |
+ |
} // end of namespace Ice |
#endif // SUBZERO_SRC_ICEINSTX8632_H |