Revision: 25146
Author:   [email protected]
Date:     Wed Nov  5 11:50:49 2014 UTC
Log:      ARM: optimize inlined doubles

Use 'vmov Dn[x], ip' instead of 'vmov Sn, ip' to load double immediates.
This patch is only useful for Turbofan as Crankshaft loads double immediates from the constant pool.
This give a little improvement on asm.js benchmarks

[email protected], [email protected]

BUG=

Review URL: https://codereview.chromium.org/704543002
https://code.google.com/p/v8/source/detail?r=25146

Modified:
 /branches/bleeding_edge/src/arm/assembler-arm.cc

=======================================
--- /branches/bleeding_edge/src/arm/assembler-arm.cc Thu Oct 30 11:00:47 2014 UTC +++ /branches/bleeding_edge/src/arm/assembler-arm.cc Wed Nov 5 11:50:49 2014 UTC
@@ -2545,27 +2545,20 @@
     uint32_t lo, hi;
     DoubleAsTwoUInt32(imm, &lo, &hi);

-    if (scratch.is(no_reg)) {
-      if (dst.code() < 16) {
- const LowDwVfpRegister loc = LowDwVfpRegister::from_code(dst.code()); - // Move the low part of the double into the lower of the corresponsing S
-        // registers of D register dst.
-        mov(ip, Operand(lo));
-        vmov(loc.low(), ip);
-
-        // Move the high part of the double into the higher of the
-        // corresponsing S registers of D register dst.
-        mov(ip, Operand(hi));
-        vmov(loc.high(), ip);
+    if (lo == hi) {
+      // Move the low and high parts of the double to a D register in one
+      // instruction.
+      mov(ip, Operand(lo));
+      vmov(dst, ip, ip);
+    } else if (scratch.is(no_reg)) {
+      mov(ip, Operand(lo));
+      vmov(dst, VmovIndexLo, ip);
+      if ((lo & 0xffff) == (hi & 0xffff)) {
+        movt(ip, hi >> 16);
       } else {
- // D16-D31 does not have S registers, so move the low and high parts
-        // directly to the D register using vmov.32.
-        // Note: This may be slower, so we only do this when we have to.
-        mov(ip, Operand(lo));
-        vmov(dst, VmovIndexLo, ip);
         mov(ip, Operand(hi));
-        vmov(dst, VmovIndexHi, ip);
       }
+      vmov(dst, VmovIndexHi, ip);
     } else {
       // Move the low and high parts of the double to a D register in one
       // instruction.

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to