Merge "Fix x86 instrumentation exit entrypoint and trace size limit."
diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S
index 68f46ad..3d87297 100644
--- a/runtime/arch/x86/quick_entrypoints_x86.S
+++ b/runtime/arch/x86/quick_entrypoints_x86.S
@@ -1277,14 +1277,12 @@
     mov  %esp, %ecx               // Remember SP
     subl LITERAL(8), %esp         // Save float return value.
     CFI_ADJUST_CFA_OFFSET(8)
-    movd %xmm0, (%esp)
+    movsd %xmm0, (%esp)
     PUSH edx                      // Save gpr return value.
     PUSH eax
-    subl LITERAL(8), %esp         // Align stack
-    movd %xmm0, (%esp)
-    subl LITERAL(8), %esp         // Pass float return value.
-    CFI_ADJUST_CFA_OFFSET(8)
-    movd %xmm0, (%esp)
+    subl LITERAL(16), %esp        // Align stack
+    CFI_ADJUST_CFA_OFFSET(16)
+    movsd %xmm0, (%esp)           // Pass float return value.
     PUSH edx                      // Pass gpr return value.
     PUSH eax
     PUSH ecx                      // Pass SP.
@@ -1299,7 +1297,7 @@
                                   // (ebx is pretending to be our LR).
     POP eax                       // Restore gpr return value.
     POP edx
-    movd (%esp), %xmm0            // Restore fpr return value.
+    movsd (%esp), %xmm0           // Restore fpr return value.
     addl LITERAL(8), %esp
     CFI_ADJUST_CFA_OFFSET(-8)
     RESTORE_REF_ONLY_CALLEE_SAVE_FRAME
diff --git a/test/run-test b/test/run-test
index 787670a..5bfa687 100755
--- a/test/run-test
+++ b/test/run-test
@@ -175,7 +175,7 @@
         suffix64="64"
         shift
     elif [ "x$1" = "x--trace" ]; then
-        run_args="${run_args} --runtime-option -Xmethod-trace --runtime-option -Xmethod-trace-file:${DEX_LOCATION}/trace.bin"
+        run_args="${run_args} --runtime-option -Xmethod-trace --runtime-option -Xmethod-trace-file:${DEX_LOCATION}/trace.bin --runtime-option -Xmethod-trace-file-size:2000000"
         shift
     elif expr "x$1" : "x--" >/dev/null 2>&1; then
         echo "unknown $0 option: $1" 1>&2