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.2.2/] [gcc/] [testsuite/] [gcc.dg/] [sh4a-sincosf.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Verify that we generate a single single-precision sine and cosine
2
   approximate (fsca) in fast math mode when a function computes both
3
   sine and cosine.  */
4
/* { dg-do compile { target "sh*-*-*" } } */
5
/* { dg-options "-O -ffast-math" } */
6
/* { dg-final { scan-assembler-times "\tfsca\t" 1 } } */
7
 
8
#if defined __SH4A__ && ! defined __SH4_NOFPU__
9
#include <math.h>
10
 
11
float test(float f) { return sinf(f) + cosf(f); }
12
#else
13
asm ("fsca\t");
14
#endif

powered by: WebSVN 2.1.0

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