Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/vect/pr33597.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { 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 |