[turbofan] Fix double register swap in ARM and ARM64 backends.
authorbaptiste.afsa@arm.com <baptiste.afsa@arm.com>
Fri, 12 Sep 2014 09:18:43 +0000 (09:18 +0000)
committerbaptiste.afsa@arm.com <baptiste.afsa@arm.com>
Fri, 12 Sep 2014 09:18:43 +0000 (09:18 +0000)
R=bmeurer@chromium.org, mstarzinger@chromium.org
BUG=v8:3553
LOG=N

Review URL: https://codereview.chromium.org/562443004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/compiler/arm/code-generator-arm.cc
src/compiler/arm64/code-generator-arm64.cc

index d663590..656abb4 100644 (file)
@@ -819,7 +819,7 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
       DwVfpRegister dst = g.ToDoubleRegister(destination);
       __ Move(temp, src);
       __ Move(src, dst);
-      __ Move(src, temp);
+      __ Move(dst, temp);
     } else {
       DCHECK(destination->IsDoubleStackSlot());
       MemOperand dst = g.ToMemOperand(destination);
index 3c5aa41..c8d5f26 100644 (file)
@@ -837,7 +837,7 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
       FPRegister dst = g.ToDoubleRegister(destination);
       __ Fmov(temp, src);
       __ Fmov(src, dst);
-      __ Fmov(src, temp);
+      __ Fmov(dst, temp);
     } else {
       DCHECK(destination->IsDoubleStackSlot());
       MemOperand dst = g.ToMemOperand(destination, masm());