|
|
nono 0.0.1
#include "fpu_emulate.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
struct fpemu dummyfe;
struct fpframe dummyframe;
int
main(int ac, char *av[])
{
struct fpemu *fe = &dummyfe;
fe->fe_fpframe = &dummyframe;
struct fpn *fp = &fe->fe_f2;
#if 0
uint32_t a[3] = { 0xbff00000, 0x80000000, 0x00000000 };
fpu_explode(fe, &fe->fe_f2, FTYPE_EXT, a);
#else
double d = atof(av[1]);
uint32_t *dp = (uint32_t *)&d;
uint32_t a[3];
a[0] = dp[1];
a[1] = dp[0];
fpu_explode(fe, &fe->fe_f2, FTYPE_DBL, a);
#endif
DUMPFPN("inp:", &fe->fe_f2);
fp = fpu_etox(fe);
DUMPFPN("ret:", fp);
return 0;
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.