Index: src/IceInstX8632.h |
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h |
index 04902d2401e4d7c73b5c56afb4e835a1fdb38826..9363a7f5c35cc6a94770bcff20dacf4e12a81c46 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); } |
@@ -888,6 +900,7 @@ public: |
InstX8632Icmp(Func, Src1, Src2); |
} |
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, Icmp); } |
@@ -906,6 +919,7 @@ public: |
InstX8632Ucomiss(Func, Src1, Src2); |
} |
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, Ucomiss); } |
@@ -1034,6 +1048,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); } |
@@ -1053,6 +1068,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); } |
@@ -1073,6 +1089,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); } |
@@ -1125,6 +1142,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); } |
@@ -1164,6 +1182,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); } |
@@ -1248,6 +1267,25 @@ 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 InstX8632Adc::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Add::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Addps::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Addss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632And::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 InstX8632Or::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Sbb::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Sqrtss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Sub::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Subps::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Subss::emitIAS(const Cfg *Func) const; |
+template <> void InstX8632Xor::emitIAS(const Cfg *Func) const; |
+ |
} // end of namespace Ice |
#endif // SUBZERO_SRC_ICEINSTX8632_H |