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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr33846.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
2
/* { dg-do compile } */
3
/* { dg-require-effective-target vect_shift } */
4
 
5
int clamp_val (int i)
6
{
7
  return ~i >> 31;
8
}
9
 
10
typedef __PTRDIFF_TYPE__ intptr_t;
11
 
12
void _mix_some_samples (intptr_t buf, int *mix_buffer, int mix_size)
13
{
14
  int i;
15
  signed int *p = mix_buffer;
16
  for (i = mix_size ; i > 0; i--)
17
  {
18
    *((short *) buf) = clamp_val ((*p) + 0x800000);
19
    buf += 2;
20
    p++;
21
  }
22
}
23
 
24
/* { dg-final { cleanup-tree-dump "vect" } } */

powered by: WebSVN 2.1.0

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