OSDN Git Service

tcg-arm: Use strd for tcg_out_arg_reg64
authorRichard Henderson <rth@twiddle.net>
Wed, 28 Aug 2013 18:16:16 +0000 (11:16 -0700)
committerRichard Henderson <rth@twiddle.net>
Tue, 1 Oct 2013 17:20:33 +0000 (10:20 -0700)
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/arm/tcg-target.c

index 9d2fe8a..f953f4e 100644 (file)
@@ -1149,9 +1149,16 @@ static TCGReg tcg_out_arg_reg64(TCGContext *s, TCGReg argreg,
     if (argreg & 1) {
         argreg++;
     }
-    argreg = tcg_out_arg_reg32(s, argreg, arglo);
-    argreg = tcg_out_arg_reg32(s, argreg, arghi);
-    return argreg;
+    if (use_armv6_instructions && argreg >= 4
+        && (arglo & 1) == 0 && arghi == arglo + 1) {
+        tcg_out_strd_8(s, COND_AL, arglo,
+                       TCG_REG_CALL_STACK, (argreg - 4) * 4);
+        return argreg + 2;
+    } else {
+        argreg = tcg_out_arg_reg32(s, argreg, arglo);
+        argreg = tcg_out_arg_reg32(s, argreg, arghi);
+        return argreg;
+    }
 }
 
 #define TLB_SHIFT      (CPU_TLB_ENTRY_BITS + CPU_TLB_BITS)