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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr47744-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target int128 } */
3
/* { dg-options "-std=gnu99" } */
4
 
5
typedef long unsigned int size_t;
6
typedef long int ssize_t;
7
typedef ssize_t index_type;
8
typedef __int128_t GFC_INTEGER_16;
9
typedef struct descriptor_dimension
10
{
11
  index_type _stride;
12
  index_type _lbound;
13
  index_type _ubound;
14
}
15
descriptor_dimension;
16
typedef struct { GFC_INTEGER_16 *data; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_i16;
17
void
18
matmul_i16 (gfc_array_i16 * const restrict retarray,
19
            gfc_array_i16 * const restrict a,
20
            GFC_INTEGER_16 bbase_yn)
21
{
22
  GFC_INTEGER_16 * restrict dest;
23
  index_type rxstride, rystride;
24
  index_type x, y, n, count, xcount;
25
  GFC_INTEGER_16 * restrict dest_y;
26
  GFC_INTEGER_16 s;
27
  const GFC_INTEGER_16 * restrict abase_n;
28
  rxstride = ((retarray)->dim[0]._stride);
29
  rystride = ((retarray)->dim[1]._stride);
30
  xcount = ((a)->dim[0]._ubound + 1 - (a)->dim[0]._lbound);
31
  dest = retarray->data;
32
  dest_y = &dest[y*rystride];
33
  for (x = 0; x < xcount; x++)
34
    dest_y[x] += abase_n[x] * bbase_yn;
35
  for (x = 0; x < xcount; x++)
36
    {
37
      for (n = 0; n < count; n++)
38
        dest_y[x*rxstride] = (GFC_INTEGER_16) 0;
39
    }
40
}

powered by: WebSVN 2.1.0

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