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/] [pr31167.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 x86_64-*-* } } */
2
/* { dg-options "-O" } */
3
 
4
typedef int int32_t;
5
 
6
int32_t round32hi (const __int128_t arg)
7
{
8
  const int SHIFT = 96;
9
  const int mshift = 96;
10
  const __int128_t M = (~(__int128_t) 0) << mshift;
11
  const __int128_t L = (~M) + 1;
12
  const __int128_t L1 = ((__int128_t) L) >> 1;
13
  const __int128_t Mlo = ((__int128_t) (~M)) >> 1;
14
  __int128_t vv = arg & M;
15
 
16
  if ((arg & (L1)) && ((arg & Mlo) || (arg & L)))
17
    vv += L;
18
 
19
  return (int32_t) (vv >> SHIFT);
20
}

powered by: WebSVN 2.1.0

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