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
7extern unsigned int x;
8
9void regparm f0(unsigned char c)
10{
11       x = (x & 0xFFFFFF00) | (unsigned int)c;
12}
13
14void regparm f1(unsigned char c)
15{
16     x = (x & 0xFFFF00FF) | ((unsigned int)c << 8);
17}
18
19void regparm f2(unsigned char c)
20{
21     x = (x & 0xFF00FFFF) | ((unsigned int)c << 16);
22}
23void 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