Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Unified Diff: src/IceInstX8632.cpp

Issue 372113005: Add support for passing and returning vectors in accordance with the x86 calling convention. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceInstX8632.cpp
diff --git a/src/IceInstX8632.cpp b/src/IceInstX8632.cpp
index 79ec127ffd36e358966b8998c3bd76dfba978029..bd221859db503bf4b3eeb042a9ebb10afbe14653 100644
--- a/src/IceInstX8632.cpp
+++ b/src/IceInstX8632.cpp
@@ -177,6 +177,12 @@ InstX8632Store::InstX8632Store(Cfg *Func, Operand *Value, OperandX8632 *Mem)
addSource(Mem);
}
+InstX8632Storep::InstX8632Storep(Cfg *Func, Operand *Value, OperandX8632 *Mem)
+ : InstX8632(Func, InstX8632::Storep, 2, NULL) {
+ addSource(Value);
+ addSource(Mem);
+}
+
InstX8632Mov::InstX8632Mov(Cfg *Func, Variable *Dest, Operand *Source)
: InstX8632(Func, InstX8632::Mov, 1, Dest) {
addSource(Source);
@@ -654,6 +660,24 @@ void InstX8632Store::dump(const Cfg *Func) const {
getSrc(0)->dump(Func);
}
+void InstX8632Storep::emit(const Cfg *Func) const {
+ Ostream &Str = Func->getContext()->getStrEmit();
+ assert(getSrcSize() == 2);
+ Str << "\tmovups\t";
+ getSrc(1)->emit(Func);
+ Str << ", ";
+ getSrc(0)->emit(Func);
+ Str << "\n";
+}
+
+void InstX8632Storep::dump(const Cfg *Func) const {
+ Ostream &Str = Func->getContext()->getStrDump();
+ Str << "storeq." << getSrc(0)->getType() << " ";
Jim Stichnoth 2014/07/08 18:03:15 storeq? should it be storep?
wala 2014/07/08 22:38:57 Done.
+ getSrc(1)->dump(Func);
+ Str << ", ";
+ getSrc(0)->dump(Func);
+}
+
void InstX8632StoreQ::emit(const Cfg *Func) const {
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -729,6 +753,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 +773,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() << " ";
« no previous file with comments | « src/IceInstX8632.h ('k') | src/IceOperand.h » ('j') | src/IceTargetLoweringX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698