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

Unified Diff: src/ia32/lithium-gap-resolver-ia32.cc

Issue 6880007: Use movaps instead of movsd in the gap resolver on ia32 as well. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-gap-resolver-ia32.cc
===================================================================
--- src/ia32/lithium-gap-resolver-ia32.cc (revision 7649)
+++ src/ia32/lithium-gap-resolver-ia32.cc (working copy)
@@ -309,12 +309,15 @@
__ mov(dst, src);
} else if (source->IsDoubleRegister()) {
- ASSERT(destination->IsDoubleRegister() ||
- destination->IsDoubleStackSlot());
XMMRegister src = cgen_->ToDoubleRegister(source);
- Operand dst = cgen_->ToOperand(destination);
- __ movdbl(dst, src);
-
+ if (destination->IsDoubleRegister()) {
+ XMMRegister dst = cgen_->ToDoubleRegister(destination);
+ __ movaps(dst, src);
+ } else {
+ ASSERT(destination->IsDoubleStackSlot());
+ Operand dst = cgen_->ToOperand(destination);
+ __ movdbl(dst, src);
+ }
} else if (source->IsDoubleStackSlot()) {
ASSERT(destination->IsDoubleRegister() ||
destination->IsDoubleStackSlot());
@@ -391,13 +394,19 @@
__ mov(dst, tmp1);
__ mov(src, tmp0);
}
+ } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) {
+ // XMM register-register swap. We rely on having xmm0
+ // available as a fixed scratch register.
+ XMMRegister src = cgen_->ToDoubleRegister(source);
+ XMMRegister dst = cgen_->ToDoubleRegister(destination);
+ __ movaps(xmm0, src);
+ __ movaps(src, dst);
+ __ movaps(dst, xmm0);
} else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) {
- // XMM register-register or register-memory. We rely on having xmm0
+ // XMM register-memory swap. We rely on having xmm0
// available as a fixed scratch register.
- ASSERT(source->IsDoubleRegister() || source->IsDoubleStackSlot());
- ASSERT(destination->IsDoubleRegister() ||
- destination->IsDoubleStackSlot());
+ ASSERT(source->IsDoubleStackSlot() || destination->IsDoubleStackSlot());
XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister()
? source
: destination);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698