2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / pr37362.c
blob14e3a75f1bb24bcad8c17a94f201da247e958c60
1 /* { dg-do compile } */
2 /* { dg-options "-march=mips64r2 -mabi=n32" } */
4 typedef float TFtype __attribute__((mode(TF)));
6 TFtype
7 __powitf (TFtype x, int m)
9 unsigned int n = m < 0 ? -m : m;
10 TFtype y = n % 2 ? x : 1;
11 while (n >>= 1)
13 x = x * x;
14 if (n % 2)
15 y = y * x;
17 return m < 0 ? 1/y : y;