1 // REQUIRES: target-is-powerpc64le
2 // RUN: %clang_builtins %s %librt -o %t && %run %t
7 COMPILER_RT_ABI
long double __floatditf(int64_t);
9 #include "floatunditf_test.h"
12 int main(int argc
, char *argv
[]) {
18 for (i
=0; i
<numTests
; ++i
) {
19 expected
.hi
= tests
[i
].hi
;
20 expected
.lo
= tests
[i
].lo
;
21 computed
.ld
= __floatditf(tests
[i
].input
);
23 if ((computed
.hi
!= expected
.hi
) || (computed
.lo
!= expected
.lo
))
25 printf("Error on __floatunditf( 0x%016llx ):\n", tests
[i
].input
);
26 printf("\tExpected %La = ( %a , %a )\n", expected
.ld
, expected
.hi
, expected
.lo
);
27 printf("\tComputed %La = ( %a , %a )\n", computed
.ld
, computed
.hi
, computed
.lo
);