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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [longlong.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 297 jeremybenn
/* Source: PR 321 modified for test suite by Neil Booth 14 Jan 2001.  */
2
 
3
typedef unsigned long long uint64;
4
unsigned long pars;
5
 
6
uint64 b[32];
7
uint64 *r = b;
8
 
9
void 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
 
23
int
24
main(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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.