From 52ec8a702f050c05e0315edbab12ff9e9d308c08 Mon Sep 17 00:00:00 2001 From: "bmeurer@chromium.org" Date: Thu, 9 Oct 2014 12:16:27 +0000 Subject: [PATCH] [ia32] Fix for no SSE4.1. TBR=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/645553002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/ia32/macro-assembler-ia32.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc index 8616848e8a..9a0c8d6be2 100644 --- a/src/ia32/macro-assembler-ia32.cc +++ b/src/ia32/macro-assembler-ia32.cc @@ -2661,20 +2661,19 @@ void MacroAssembler::Move(XMMRegister dst, uint64_t src) { } else if (lower == 0) { Move(dst, upper); psllq(dst, 32); - } else { + } else if (CpuFeatures::IsSupported(SSE4_1)) { + CpuFeatureScope scope(this, SSE4_1); push(eax); Move(eax, Immediate(lower)); movd(dst, Operand(eax)); Move(eax, Immediate(upper)); - if (CpuFeatures::IsSupported(SSE4_1)) { - CpuFeatureScope scope(this, SSE4_1); - pinsrd(dst, Operand(eax), 1); - } else { - psllq(dst, 32); - movd(xmm0, Operand(eax)); - orpd(dst, xmm0); - } + pinsrd(dst, Operand(eax), 1); pop(eax); + } else { + push(Immediate(upper)); + push(Immediate(lower)); + movsd(dst, Operand(esp, 0)); + add(esp, Immediate(kDoubleSize)); } } }