Patchwork [PR43920,8/9] Cross-jumping - Extend search scope - test case.

login
register
mail settings
Submitter Tom de Vries
Date March 31, 2011, 6:44 p.m.
Message ID <4D94CB8C.2010905@codesourcery.com>
Download mbox | patch
Permalink /patch/89113/
State New
Headers show

Comments

Tom de Vries - March 31, 2011, 6:44 p.m.
Test-case for crossjump-fallthru-ml.patch.

Thanks,
- Tom
Jeff Law - March 31, 2011, 6:56 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/31/11 12:44, Tom de Vries wrote:
> Test-case for crossjump-fallthru-ml.patch.
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNlM5qAAoJEBRtltQi2kC74ksIAJHPSGtw95AknD0wil+UFHaR
gJtk6oJaaBKAtI1euogaiqvHRr6OaR8OrHS93vGIKZRAG5ji0qs5sEp66dr4v0Em
O/g9US7i0HrTFeNDYWp/2jarhCFbhRLzXRUIKEBw7vlrtUjIE3S7udV8w3yPwtnf
VXKQk79WWsDh2XJyYubznRBeS7zh+fspgLpN7grvduZaFSHwOyrAVQVmVROL5Ylq
U6R4pM7kok5K20/+xi+CfrUTpQean3H1onxmaq2rY7UOR5W1/Ia8Gd6jeMEgKcBL
n/E5vI5CFFam4qa+R4i1kNw6IKWWsAjJTxQSx8C5HvR41hnEAb1w4UD3sNRngFI=
=fGZq
-----END PGP SIGNATURE-----

Patch

Index: gcc/testsuite/gcc.target/arm/pr43920-2.c
===================================================================
--- gcc/testsuite/gcc.target/arm/pr43920-2.c	(revision 0)
+++ gcc/testsuite/gcc.target/arm/pr43920-2.c	(revision 0)
@@ -0,0 +1,28 @@ 
+/* { dg-do compile } */
+/* { dg-options "-march=armv7-a -mthumb -Os" } */
+
+#include <stdio.h>
+
+int getFileStartAndLength (int fd, int *start_, size_t *length_)
+{
+      int start, end;
+      size_t length;
+
+      start = lseek (fd, 0L, SEEK_CUR);
+      end = lseek (fd, 0L, SEEK_END);
+
+      if (start == -1 || end == -1)
+         return -1;
+
+      length = end - start;
+      if (length == 0)
+         return -1;
+
+      *start_ = start;
+      *length_ = length;
+
+      return 0;
+}
+
+/* { dg-final { scan-assembler-times "pop" 2 } } */
+/* { dg-final { scan-assembler-times "beq" 3 } } */