minix/sys/external/bsd/compiler_rt/dist/test/Unit/ppc/floatditf_test.c
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

31 lines
677 B
C

#include <stdint.h>
#include <stdio.h>
long double __floatditf(int64_t);
#include "floatunditf_test.h"
#include "DD.h"
int main(int argc, char *argv[]) {
int i;
DD expected;
DD computed;
for (i=0; i<numTests; ++i) {
expected.hi = tests[i].hi;
expected.lo = tests[i].lo;
computed.ld = __floatditf(tests[i].input);
if ((computed.hi != expected.hi) || (computed.lo != expected.lo))
{
printf("Error on __floatunditf( 0x%016llx ):\n", tests[i].input);
printf("\tExpected %La = ( %a , %a )\n", expected.ld, expected.hi, expected.lo);
printf("\tComputed %La = ( %a , %a )\n", computed.ld, computed.hi, computed.lo);
return 1;
}
}
return 0;
}