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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr49030.c] - Blame information for rev 754

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-require-effective-target int32plus } */
2
 
3
void
4
sample_move_d32u24_sS (char *dst, float *src, unsigned long nsamples,
5
                       unsigned long dst_skip)
6
{
7
  long long y;
8
  while (nsamples--)
9
    {
10
      y = (long long) (*src * 8388608.0f) << 8;
11
      if (y > 2147483647) {
12
        *(int *) dst = 2147483647;
13
      } else if (y < -2147483647 - 1) {
14
        *(int *) dst = -2147483647 - 1;
15
      } else {
16
        *(int *) dst = (int) y;
17
      }
18
      dst += dst_skip;
19
      src++;
20
    }
21
}

powered by: WebSVN 2.1.0

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