blob: 68403275f7caa2e88cbb37f9a0af7f5c6227b415 (
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
31
32
33
34
35
|
/* { dg-do run { target lp64 } } */
/* { dg-options "-O2 -march=z14 -save-temps" } */
/*
** signbit_longdouble_reg:
** ld %f0,0(%r2);ld %f2,8+0(%r2)
** lgdr (%r[0-9]+),%f0
** srlg %r2,\1,63
** br %r14
*/
__attribute__ ((noipa))
int
signbit_longdouble_reg (long double x)
{
__asm__ ("" : "+f" (x));
return __builtin_signbit (x);
}
/*
** signbit_longdouble_mem:
** lg (%r[0-9]+),0\(%r2\)
** srlg %r2,\1,63
** br %r14
*/
__attribute__ ((noipa))
int signbit_longdouble_mem (long double *x) { return __builtin_signbit (*x); }
#include "signbit.h"
TEST (longdouble, long double, __builtin_infl(), __builtin_nanl("42"), 0.L, 42.L)
int
main (void)
{
test_longdouble ();
}
|