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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [powerpc/] [ppc-fma-5.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run { target { powerpc*-*-* } } } */
2
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
3
/* { dg-require-effective-target powerpc_fprs } */
4
/* { dg-options "-O2 -mcpu=power5 -std=c99" } */
5
 
6
#ifndef __FP_FAST_FMA
7
#error "__FP_FAST_FMA should be defined"
8
#endif
9
 
10
#ifndef __FP_FAST_FMAF
11
#error "__FP_FAST_FMAF should be defined"
12
#endif
13
 
14
double d_a = 2.0,  d_b = 3.0,  d_c = 4.0;
15
float  f_a = 2.0f, f_b = 3.0f, f_c = 4.0f;
16
 
17
int
18
main (void)
19
{
20
  if (__builtin_fma (d_a, d_b, d_c) != (2.0 * 3.0) + 4.0)
21
    __builtin_abort ();
22
 
23
  if (__builtin_fmaf (f_a, f_b, f_c) != (2.0f * 3.0f) + 4.0f)
24
    __builtin_abort ();
25
 
26
  return 0;
27
}

powered by: WebSVN 2.1.0

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