|
|
1.1 ! root 1: #include "fpu_emulate.h" ! 2: #include <stdio.h> ! 3: #include <stdlib.h> ! 4: #include <string.h> ! 5: #include <sys/time.h> ! 6: ! 7: struct fpemu dummyfe; ! 8: struct fpframe dummyframe; ! 9: ! 10: int ! 11: main(int ac, char *av[]) ! 12: { ! 13: struct fpemu *fe = &dummyfe; ! 14: fe->fe_fpframe = &dummyframe; ! 15: struct fpn *fp = &fe->fe_f2; ! 16: ! 17: #if 0 ! 18: uint32_t a[3] = { 0xbff00000, 0x80000000, 0x00000000 }; ! 19: fpu_explode(fe, &fe->fe_f2, FTYPE_EXT, a); ! 20: #else ! 21: double d = atof(av[1]); ! 22: uint32_t *dp = (uint32_t *)&d; ! 23: uint32_t a[3]; ! 24: a[0] = dp[1]; ! 25: a[1] = dp[0]; ! 26: fpu_explode(fe, &fe->fe_f2, FTYPE_DBL, a); ! 27: #endif ! 28: DUMPFPN("inp:", &fe->fe_f2); ! 29: ! 30: fp = fpu_etox(fe); ! 31: DUMPFPN("ret:", fp); ! 32: return 0; ! 33: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.