Rebase.
[official-gcc.git] / gcc / testsuite / gcc.target / mips / pr37362.c
blob848d879d3254eec55edccf1db77f2bf353b4b544
1 /* mips*-sde-elf doesn't have 128-bit long doubles. */
2 /* { dg-do compile { target { ! { mips*-sde-elf mips*-mti-elf } } } } */
3 /* { dg-options "-march=mips64r2 -mabi=n32" } */
5 typedef float TFtype __attribute__((mode(TF)));
7 TFtype
8 __powitf (TFtype x, int m)
10 unsigned int n = m < 0 ? -m : m;
11 TFtype y = n % 2 ? x : 1;
12 while (n >>= 1)
14 x = x * x;
15 if (n % 2)
16 y = y * x;
18 return m < 0 ? 1/y : y;