OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr31167.c] - Blame information for rev 322

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

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target lp64 } */
3
/* { dg-options "-O" } */
4
 
5
typedef int int32_t;
6
 
7
int32_t round32hi (const __int128_t arg)
8
{
9
  const int SHIFT = 96;
10
  const int mshift = 96;
11
  const __int128_t M = (~(__int128_t) 0) << mshift;
12
  const __int128_t L = (~M) + 1;
13
  const __int128_t L1 = ((__int128_t) L) >> 1;
14
  const __int128_t Mlo = ((__int128_t) (~M)) >> 1;
15
  __int128_t vv = arg & M;
16
 
17
  if ((arg & (L1)) && ((arg & Mlo) || (arg & L)))
18
    vv += L;
19
 
20
  return (int32_t) (vv >> SHIFT);
21
}

powered by: WebSVN 2.1.0

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