Index: src/IceInstX8632.cpp |
diff --git a/src/IceInstX8632.cpp b/src/IceInstX8632.cpp |
index 79ec127ffd36e358966b8998c3bd76dfba978029..c783995416ef30383a76c96215a9d7bba9cc6c97 100644 |
--- a/src/IceInstX8632.cpp |
+++ b/src/IceInstX8632.cpp |
@@ -729,6 +729,14 @@ void InstX8632Movp::emit(const Cfg *Func) const { |
Str << "\n"; |
} |
+void InstX8632Movp::dump(const Cfg *Func) const { |
+ Ostream &Str = Func->getContext()->getStrDump(); |
+ Str << "movups." << getDest()->getType() << " "; |
+ dumpDest(Func); |
+ Str << ", "; |
+ dumpSources(Func); |
+} |
+ |
void InstX8632Movq::emit(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrEmit(); |
assert(getSrcSize() == 1); |
@@ -741,14 +749,6 @@ void InstX8632Movq::emit(const Cfg *Func) const { |
Str << "\n"; |
} |
-void InstX8632Movp::dump(const Cfg *Func) const { |
- Ostream &Str = Func->getContext()->getStrDump(); |
- Str << "movups." << getDest()->getType() << " "; |
- dumpDest(Func); |
- Str << ", "; |
- dumpSources(Func); |
-} |
- |
void InstX8632Movq::dump(const Cfg *Func) const { |
Ostream &Str = Func->getContext()->getStrDump(); |
Str << "movq." << getDest()->getType() << " "; |
@@ -877,14 +877,19 @@ void InstX8632Push::emit(const Cfg *Func) const { |
assert(getSrcSize() == 1); |
Type Ty = getSrc(0)->getType(); |
Variable *Var = llvm::dyn_cast<Variable>(getSrc(0)); |
- if ((Ty == IceType_f32 || Ty == IceType_f64) && Var && Var->hasReg()) { |
+ if ((isVectorType(Ty) || Ty == IceType_f32 || Ty == IceType_f64) && Var && |
+ Var->hasReg()) { |
// The xmm registers can't be directly pushed, so we fake it by |
// decrementing esp and then storing to [esp]. |
Str << "\tsub\tesp, " << typeWidthInBytes(Ty) << "\n"; |
if (!SuppressStackAdjustment) |
Func->getTarget()->updateStackAdjustment(typeWidthInBytes(Ty)); |
- Str << "\tmov" << TypeX8632Attributes[Ty].SdSsString << "\t" |
- << TypeX8632Attributes[Ty].WidthString << " [esp], "; |
+ if (isVectorType(Ty)) { |
+ Str << "\tmovups\txmmword ptr [esp], "; |
+ } else { |
+ Str << "\tmov" << TypeX8632Attributes[Ty].SdSsString << "\t" |
+ << TypeX8632Attributes[Ty].WidthString << " [esp], "; |
+ } |
getSrc(0)->emit(Func); |
Str << "\n"; |
} else if (Ty == IceType_f64 && (!Var || !Var->hasReg())) { |