First (not quite working) floating point benchmark.

This commit is contained in:
Chad Kersey
2013-10-06 13:40:05 -04:00
parent 89e66d64f2
commit 0e0aa64e74
6 changed files with 45 additions and 10 deletions

View File

@@ -16,14 +16,14 @@
#include "include/asm-tokens.h"
#include "include/harpfloat.h"
extern int lexerBits;
extern int lexerBytes;
static int64_t read_number(const char *s) {
while (!isdigit(*s) && *s != '-' && *s != '+') s++;
if (strchr(s, 'f') || strchr(s, '.')) {
double d;
sscanf(s, "%f", &d);
return Harp::Word_u(Harp::Float(d, lexerBits));
return Harp::Word_u(Harp::Float(d, lexerBytes));
} else {
long long u;
sscanf(s, "%lli", &u);