OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [unsorted/] [bcopy.c] - Blame information for rev 717

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
void
2
bcopy1 (s, d, c)
3
     long long *s;
4
     long long *d;
5
     int c;
6
{
7
  int i;
8
  c = c / 8;
9
  for (i = 0;  i < c;  i++)
10
    d[i] = s[i];
11
}
12
 
13
void
14
bcopy2 (s, d, c)
15
     long *s;
16
     long *d;
17
     int c;
18
{
19
  int i;
20
  c = c / 4;
21
  for (i = 0;  i < c;  i++)
22
    d[i] = s[i];
23
}
24
 
25
 
26
void
27
bcopy3 (s, d, c)
28
     char *s;
29
     char *d;
30
     int c;
31
{
32
  long long z0, z1;
33
  int r = d - s;
34
 
35
  int i;
36
 
37
  c /= 16;
38
 
39
  z0 = *((long long *) s);
40
  s += 8;
41
  z1 = *((long long *) s);
42
  s += 8;
43
  for (i = 0; i < c; i++)
44
    {
45
      *(long long *)(s + r) = z0;
46
      z0 = *((long long *) s);
47
      s += 8;
48
      *(long long *)(s + r) = z1;
49
      z1 = *((long long *) s);
50
      s += 8;
51
    }
52
}
53
 
54
#if defined(STACK_SIZE) && STACK_SIZE < 16384
55
#define BYTES STACK_SIZE
56
#else
57
#define BYTES 16384
58
#endif
59
 
60
main ()
61
{
62
  long long s[BYTES / 8];
63
  long long d[BYTES / 8];
64
  int i;
65
 
66
  for (i = 1; i < 67108864 / BYTES; i++)
67
    bcopy (s, d, BYTES);
68
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.