1/* Source: PR 321 modified for test suite by Neil Booth 14 Jan 2001.  */
2
3typedef unsigned long long uint64;
4unsigned long pars;
5
6uint64 b[32];
7uint64 *r = b;
8
9void alpha_ep_extbl_i_eq_0()
10{
11  unsigned int rb, ra, rc;
12
13  rb  = (((unsigned long)(pars) >> 27)) & 0x1fUL;
14  ra  = (((unsigned int)(pars) >> 5)) & 0x1fUL;
15  rc  = (((unsigned int)(pars) >> 0)) & 0x1fUL;
16  {
17    uint64 temp = ((r[ra] >> ((r[rb] & 0x7) << 3)) & 0x00000000000000FFLL);
18    if (rc != 31)
19      r[rc] = temp;
20  }
21}
22
23int
24main(void)
25{
26  if (sizeof (uint64) == 8)
27    {
28      b[17] = 0x0000000000303882ULL; /* rb */
29      b[2] = 0x534f4f4c494d000aULL; /* ra & rc */
30
31      pars = 0x88000042;	/* 17, 2, 2 coded */
32      alpha_ep_extbl_i_eq_0();
33
34      if (b[2] != 0x4d)
35	abort ();
36    }
37
38  exit (0);
39}
40