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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [ia64/] [builtin-fma-1.c] - Blame information for rev 848

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

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O" } */
3
/* Don't confuse the fma insn with the fma in the filename.  */
4
/* { dg-final { scan-assembler-times "fma\\." 4 } } */
5
/* { dg-final { scan-assembler-times "fms" 2 } } */
6
/* { dg-final { scan-assembler-times "fnma" 4 } } */
7
 
8
#ifndef __FP_FAST_FMAF
9
# error "__FP_FAST_FMAF should be defined"
10
#endif
11
#ifndef __FP_FAST_FMA
12
# error "__FP_FAST_FMA should be defined"
13
#endif
14
 
15
float f0(float x, float y, float z) { return __builtin_fmaf(x,y,z); }
16
float f1(float x, float y, float z) { return __builtin_fmaf(x,y,-z); }
17
float f2(float x, float y, float z) { return __builtin_fmaf(-x,y,z); }
18
float f3(float x, float y, float z) { return __builtin_fmaf(x,-y,z); }
19
float f4(float x, float y, float z) { return __builtin_fmaf(-x,-y,z); }
20
 
21
double d0(double x, double y, double z) { return __builtin_fma(x,y,z); }
22
double d1(double x, double y, double z) { return __builtin_fma(x,y,-z); }
23
double d2(double x, double y, double z) { return __builtin_fma(-x,y,z); }
24
double d3(double x, double y, double z) { return __builtin_fma(x,-y,z); }
25
double d4(double x, double y, double z) { return __builtin_fma(-x,-y,z); }

powered by: WebSVN 2.1.0

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