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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [mips/] [pr37362.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 321 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-march=mips64r2 -mabi=n32" } */
3
 
4
typedef float TFtype __attribute__((mode(TF)));
5
 
6
TFtype
7
__powitf (TFtype x, int m)
8
{
9
  unsigned int n = m < 0 ? -m : m;
10
  TFtype y = n % 2 ? x : 1;
11
  while (n >>= 1)
12
    {
13
      x = x * x;
14
      if (n % 2)
15
        y = y * x;
16
    }
17
  return m < 0 ? 1/y : y;
18
}
19
 

powered by: WebSVN 2.1.0

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