1 /* PR 15184 first two tests, plus two addition ones.  */
2 /* { dg-do compile { target ia32 } } */
3 /* { dg-options "-O2 -march=pentiumpro" } */
4 
5 #define regparm __attribute__((__regparm__(1)))
6 
7 extern unsigned int x;
8 
f0(unsigned char c)9 void regparm f0(unsigned char c)
10 {
11        x = (x & 0xFFFFFF00) | (unsigned int)c;
12 }
13 
f1(unsigned char c)14 void regparm f1(unsigned char c)
15 {
16      x = (x & 0xFFFF00FF) | ((unsigned int)c << 8);
17 }
18 
f2(unsigned char c)19 void regparm f2(unsigned char c)
20 {
21      x = (x & 0xFF00FFFF) | ((unsigned int)c << 16);
22 }
f3(unsigned char c)23 void regparm f3(unsigned char c)
24 {
25      x = (x & 0x00FFFFFF) | ((unsigned int)c << 24);
26 }
27 
28 
29 /* Each function should compile down to a byte move from
30    the input register into x, possibly at an offset within x.  */
31 /* { dg-final { scan-assembler-times "movb\[ \\t\]+%al" 4 } } */
32 
33