Index: src/IceInstX8632.cpp |
diff --git a/src/IceInstX8632.cpp b/src/IceInstX8632.cpp |
index f1a68da1da65423e572551f478a50b9ad99c769b..ef6c5a4e195039eac82f8c4076de9fa8f85d8c05 100644 |
--- a/src/IceInstX8632.cpp |
+++ b/src/IceInstX8632.cpp |
@@ -36,6 +36,18 @@ const struct InstX8632BrAttributes_ { |
const size_t InstX8632BrAttributesSize = |
llvm::array_lengthof(InstX8632BrAttributes); |
+const struct InstX8632CmppsAttributes_ { |
+ const char *EmitString; |
+} InstX8632CmppsAttributes[] = { |
+#define X(tag, emit) \ |
+ { emit } \ |
+ , |
+ ICEINSTX8632CMPPS_TABLE |
+#undef X |
+ }; |
+const size_t InstX8632CmppsAttributesSize = |
+ llvm::array_lengthof(InstX8632CmppsAttributes); |
+ |
const struct TypeX8632Attributes_ { |
const char *CvtString; // i (integer), s (single FP), d (double FP) |
const char *SdSsString; // ss, sd, or <blank> |
@@ -149,6 +161,13 @@ InstX8632Cmov::InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, |
addSource(Source); |
} |
+InstX8632Cmpps::InstX8632Cmpps(Cfg *Func, Variable *Dest, Operand *Source, |
+ InstX8632Cmpps::CmppsCond Condition) |
+ : InstX8632(Func, InstX8632::Cmpps, 2, Dest), Condition(Condition) { |
+ addSource(Dest); |
+ addSource(Source); |
+} |
+ |
InstX8632Cmpxchg::InstX8632Cmpxchg(Cfg *Func, Operand *DestOrAddr, |
Variable *Eax, Variable *Desired, |
bool Locked) |
@@ -694,6 +713,28 @@ void InstX8632Cmov::dump(const Cfg *Func) const { |
dumpSources(Func); |
} |
+void InstX8632Cmpps::emit(const Cfg *Func) const { |
+ Ostream &Str = Func->getContext()->getStrEmit(); |
+ assert(getSrcSize() == 2); |
+ assert(Condition < InstX8632CmppsAttributesSize); |
+ Str << "\t"; |
+ Str << "cmp" << InstX8632CmppsAttributes[Condition].EmitString << "ps" |
+ << "\t"; |
+ getDest()->emit(Func); |
+ Str << ", "; |
+ getSrc(1)->emit(Func); |
+ Str << "\n"; |
+} |
+ |
+void InstX8632Cmpps::dump(const Cfg *Func) const { |
+ Ostream &Str = Func->getContext()->getStrDump(); |
+ assert(Condition < InstX8632CmppsAttributesSize); |
+ dumpDest(Func); |
+ Str << " = cmp" << InstX8632CmppsAttributes[Condition].EmitString << "ps" |
+ << "\t"; |
+ dumpSources(Func); |
+} |
+ |
void InstX8632Cmpxchg::emit(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrEmit(); |
assert(getSrcSize() == 3); |