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.target/] [i386/] [pr33552.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* PR rtl-optimization/33552 */
2
/* { dg-do run } */
3
/* { dg-options "-O2" } */
4
 
5
extern void abort (void);
6
 
7
void
8
__attribute__((noinline))
9
foo (unsigned long *wp, unsigned long *up, long un, unsigned long *vp)
10
{
11
  long j;
12
  unsigned long prod_low, prod_high;
13
  unsigned long cy_dig;
14
  unsigned long v_limb;
15
  v_limb = vp[0];
16
  cy_dig = 64;
17
  for (j = un; j > 0; j--)
18
    {
19
      unsigned long u_limb, w_limb;
20
      u_limb = *up++;
21
      __asm__ (""
22
               : "=r" (prod_low), "=r" (prod_high)
23
               : "0" (u_limb), "1" (v_limb));
24
      __asm__ ("mov %5, %1; add %5, %0"
25
               : "=r" (cy_dig), "=&r" (w_limb)
26
               : "0" (prod_high), "rm" (0), "1" (prod_low), "rm" (cy_dig));
27
      *wp++ = w_limb;
28
    }
29
}
30
 
31
int
32
main (void)
33
{
34
  unsigned long wp[4];
35
  unsigned long up[4] = { 0x1248, 0x248a, 0x1745, 0x1853 };
36
  unsigned long vp = 0xdead;
37
  foo (wp, up, 4, &vp);
38
  if (wp[0] != 0x40 || wp[1] != 0xdeed || wp[2] != 0x1bd9a || wp[3] != 0x29c47)
39
    abort ();
40
  return 0;
41
}

powered by: WebSVN 2.1.0

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