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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [pr33597.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
 
3
typedef unsigned char uint8_t;
4
typedef unsigned short uint16_t;
5
 
6
void
7
rgb15to24_C (const uint8_t * src, uint8_t * dst, long src_size)
8
{
9
  const uint16_t *end;
10
  const uint16_t *s = (uint16_t *)src;
11
  uint8_t *d = (uint8_t *)dst;
12
 
13
  end = s + src_size/2;
14
  while (s < end)
15
    {
16
      uint16_t bgr = *s++;
17
 
18
      *d++ = (bgr&0x1F)<<3;
19
      *d++ = (bgr&0x3E0)>>2;
20
      *d++ = (bgr&0x7C00)>>7;
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.