From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.c-torture/unsorted/bcopy.c | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/unsorted/bcopy.c (limited to 'gcc/testsuite/gcc.c-torture/unsorted/bcopy.c') diff --git a/gcc/testsuite/gcc.c-torture/unsorted/bcopy.c b/gcc/testsuite/gcc.c-torture/unsorted/bcopy.c new file mode 100644 index 000000000..aed994e57 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/unsorted/bcopy.c @@ -0,0 +1,68 @@ +void +bcopy1 (s, d, c) + long long *s; + long long *d; + int c; +{ + int i; + c = c / 8; + for (i = 0; i < c; i++) + d[i] = s[i]; +} + +void +bcopy2 (s, d, c) + long *s; + long *d; + int c; +{ + int i; + c = c / 4; + for (i = 0; i < c; i++) + d[i] = s[i]; +} + + +void +bcopy3 (s, d, c) + char *s; + char *d; + int c; +{ + long long z0, z1; + int r = d - s; + + int i; + + c /= 16; + + z0 = *((long long *) s); + s += 8; + z1 = *((long long *) s); + s += 8; + for (i = 0; i < c; i++) + { + *(long long *)(s + r) = z0; + z0 = *((long long *) s); + s += 8; + *(long long *)(s + r) = z1; + z1 = *((long long *) s); + s += 8; + } +} + +#if defined(STACK_SIZE) && STACK_SIZE < 16384 +#define BYTES STACK_SIZE +#else +#define BYTES 16384 +#endif + +main () +{ + long long s[BYTES / 8]; + long long d[BYTES / 8]; + int i; + + for (i = 1; i < 67108864 / BYTES; i++) + bcopy (s, d, BYTES); +} -- cgit v1.2.3