1 // REQUIRES: powerpc-registered-target 2 // RUN: %clang_builtins %s -o %t && %run %t 3 #include <stdint.h> 4 #include <stdio.h> 5 6 COMPILER_RT_ABI long double __floatditf(int64_t); 7 8 #include "floatunditf_test.h" 9 #include "DD.h" 10 11 int main(int argc, char *argv[]) { 12 int i; 13 14 DD expected; 15 DD computed; 16 17 for (i=0; i<numTests; ++i) { 18 expected.hi = tests[i].hi; 19 expected.lo = tests[i].lo; 20 computed.ld = __floatditf(tests[i].input); 21 22 if ((computed.hi != expected.hi) || (computed.lo != expected.lo)) 23 { 24 printf("Error on __floatunditf( 0x%016llx ):\n", tests[i].input); 25 printf("\tExpected %La = ( %a , %a )\n", expected.ld, expected.hi, expected.lo); 26 printf("\tComputed %La = ( %a , %a )\n", computed.ld, computed.hi, computed.lo); 27 return 1; 28 } 29 } 30 31 return 0; 32 } 33