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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [990130-1.c] - Blame information for rev 844

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2
/* { dg-options -O0 } */
3
 
4
typedef          int SItype     __attribute__ ((mode (SI)));
5
typedef          int DItype     __attribute__ ((mode (DI)));
6
typedef unsigned int USItype    __attribute__ ((mode (SI)));
7
  struct DIstruct {SItype low, high;};
8
typedef union
9
{
10
  struct DIstruct s;
11
  DItype ll;
12
} DIunion;
13
DItype
14
__muldi3 (DItype u, DItype v)
15
{
16
  DIunion w;
17
  DIunion uu, vv;
18
  uu.ll = u,
19
  vv.ll = v;
20
  w.ll = ({DIunion __w; __asm__ ("mull %3"      : "=a" ((USItype) (  __w.s.low )),      "=d" ((USItype) ( __w.s.high )) : "%0" ((USItype) (   uu.s.low  )),     "rm" ((USItype) (    vv.s.low  ))) ;    __w.ll; }) ;
21
  w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high
22
               + (USItype) uu.s.high * (USItype) vv.s.low);
23
  return w.ll;
24
}

powered by: WebSVN 2.1.0

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