summaryrefslogtreecommitdiff
path: root/deps/v8/src/ia32/lithium-gap-resolver-ia32.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-06-29 17:26:51 +0200
committerRyan Dahl <ry@tinyclouds.org>2011-06-29 17:26:51 +0200
commit33af2720f26c2b25bc7f75ce7eb454ff99db6d35 (patch)
tree9a38f0c96420edf503eebd6325dd8d2d8249f653 /deps/v8/src/ia32/lithium-gap-resolver-ia32.cc
parent6afdca885adeeeed9eef8cbb01c3d97af0bc084d (diff)
downloadnode-new-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.gz
Upgrade V8 to 3.4.8
Diffstat (limited to 'deps/v8/src/ia32/lithium-gap-resolver-ia32.cc')
-rw-r--r--deps/v8/src/ia32/lithium-gap-resolver-ia32.cc33
1 files changed, 24 insertions, 9 deletions
diff --git a/deps/v8/src/ia32/lithium-gap-resolver-ia32.cc b/deps/v8/src/ia32/lithium-gap-resolver-ia32.cc
index 45c790f3f0..9d91c61840 100644
--- a/deps/v8/src/ia32/lithium-gap-resolver-ia32.cc
+++ b/deps/v8/src/ia32/lithium-gap-resolver-ia32.cc
@@ -25,6 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include "v8.h"
+
+#if defined(V8_TARGET_ARCH_IA32)
+
#include "ia32/lithium-gap-resolver-ia32.h"
#include "ia32/lithium-codegen-ia32.h"
@@ -305,12 +309,15 @@ void LGapResolver::EmitMove(int index) {
__ 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());
@@ -387,13 +394,19 @@ void LGapResolver::EmitSwap(int index) {
__ 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);
@@ -458,3 +471,5 @@ void LGapResolver::EmitSwap(int index) {
#undef __
} } // namespace v8::internal
+
+#endif // V8_TARGET_ARCH_IA32