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/] [c-c++-common/] [dfp/] [signbit-1.c] - Blame information for rev 295

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 295 jeremybenn
/* { dg-options "-O0" } */
2
 
3
/* Decimal float versions of __builtin_signbit.  */
4
 
5
#include "dfp-dbg.h"
6
 
7
#define CHECK32(D,I) \
8
  if ((__builtin_signbitd32 (D) != 0) != I) FAILURE
9
 
10
#define CHECK64(D,I) \
11
  if ((__builtin_signbitd64 (D) != 0) != I) FAILURE
12
 
13
#define CHECK128(D,I) \
14
  if ((__builtin_signbitd128 (D) != 0) != I) FAILURE
15
 
16
/* Prevent the compiler from folding the calls at compile time.  */
17
volatile _Decimal32 sd;
18
volatile _Decimal64 dd;
19
volatile _Decimal128 td;
20
 
21
int
22
main ()
23
{
24
  sd = 1.9df;  CHECK32 (sd, 0)
25
  sd = -5.3df; CHECK32 (sd, 1)
26
  sd = 0.0df;  CHECK32 (sd, 0)
27
  sd = -0.0df; CHECK32 (sd, 1)
28
 
29
  dd = 1.9dd;  CHECK64 (dd, 0)
30
  dd = -5.3dd; CHECK64 (dd, 1)
31
  dd = 0.0dd;  CHECK64 (dd, 0)
32
  dd = -0.0dd; CHECK64 (dd, 1)
33
 
34
  td = 1.9dl;  CHECK128 (td, 0)
35
  td = -5.3dl; CHECK128 (td, 1)
36
  td = 0.0dl;  CHECK128 (td, 0)
37
  td = -0.0dl; CHECK128 (td, 1)
38
 
39
  FINISH
40
}

powered by: WebSVN 2.1.0

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