diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
commit | ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (patch) | |
tree | 9b19e801150082c33e9152275829a6ce90614b55 /test/builtins/Unit/ppc/floatunditf_test.c | |
parent | 8ef50bf3d1c287b5013c3168de77a462dfce3495 (diff) |
Notes
Diffstat (limited to 'test/builtins/Unit/ppc/floatunditf_test.c')
-rw-r--r-- | test/builtins/Unit/ppc/floatunditf_test.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/builtins/Unit/ppc/floatunditf_test.c b/test/builtins/Unit/ppc/floatunditf_test.c new file mode 100644 index 0000000000000..68390d1972297 --- /dev/null +++ b/test/builtins/Unit/ppc/floatunditf_test.c @@ -0,0 +1,30 @@ +#include <stdint.h> +#include <stdio.h> + +long double __floatunditf(uint64_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 = __floatunditf(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; +} |