blob: 31a020037d0f3a27c2df1a24f4e4623fc8f77511 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* { dg-do run { target { powerpc*-*-* } } } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target p9vector_hw } */
/* { dg-options "-mcpu=power9" } */
/* This test should succeed only on 64-bit configurations. */
#include <altivec.h>
#include <stdlib.h>
unsigned long long int
get_significand (double *p)
{
double source = *p;
return scalar_extract_sig (source);
}
int
main ()
{
double x = (double) (0x1100LL << 50);
double z = (double) (0x1101LL << 37);
if (get_significand (&x) != 0x18000000000000LL)
abort ();
if (get_significand (&z) != 0x1a000000000000LL)
abort ();
return 0;
}
|