mips64: Change the input values for FPU tests.

Change the input values so that the binary values
is representing exactly the same float values.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13632
This commit is contained in:
Dejan Jevtic 2013-10-10 09:10:35 +00:00
parent 90902aaf13
commit eb65531207
6 changed files with 4187 additions and 4178 deletions

View File

@ -75,3 +75,4 @@ AM_CCASFLAGS += @FLAG_M64@
allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
cvm_ins_CFLAGS = $(AM_CFLAGS) -g -O0 -march=octeon
fpu_arithmetic_CFLAGS = $(AM_CFLAGS) -lm

View File

@ -95,57 +95,57 @@ void init_reg_val_zero()
#define NaN 0.0/0.0
const double fr_d[] = {
-34785666666.475, 356047.56, -1.0, 23.04,
1752, 0.0024575, 0.00000001, -248562.76,
1384.6, -7.2945676, 1000000000, -5786.47,
-347856.475, 356047.56, -1.0, 23.04,
0, 45655555555.2489562, 3, -1,
-45786.476, 4566666.2489562, 34.00046, 45786.476,
-347856.5, 356047.5, -1.0, 23.0625,
1752, 0.015625, 0.03125, -248562.75,
1384.5, -7.25, 1000000000, -5786.5,
-347856.75, 356047.75, -1.0, 23.03125,
0, 456.25, 3, -1,
-45786.5, 456, 34.03125, 45786.03125,
};
const double fs_d[] = {
0, 456.2489562, 3, -1,
1384.6, -7.2945676, 1000000000, -5786.47,
1752, 0.0024575, 0.00000001, -248562.76,
-45786.476, 456.2489562, 34.00046, 45786.476,
1752065, 107, -45667.24, -7.2945676,
-347856.475, 356047.56, -1.0, 23.04
0, 456.25, 3, -1,
1384.5, -7.25, 1000000000, -5786.5,
1752, 0.015625, 0.03125, -248562.75,
-45786.5, 456, 34.03125, 45786.75,
1752065, 107, -45667.25, -7,
-347856.5, 356047.5, -1.0, 23.0625
};
const double ft_d[] = {
-45786.476, 456.2489562, 34.00046, 45786.476,
1752065, 107, -45667.24, -7.2945676,
-347856.475, 356047.56, -1.0, 23.04,
0, 456.2489562, 3, -1,
1384.6, -7.2945676, 1000000000, -5786.47,
1752, 0.0024575, 0.00000001, -248562.76
-45786.5, 456.25, 34.03125, 45786.75,
1752065, 107, -45667.25, -7.25,
-347856.5, 356047.5, -1.0, 23.0625,
0, 456.25, 3, -1,
1384.5, -7, 1000000000, -5786.5,
1752, 0.015625, 0.03125, -248562.75
};
const float fr_f[] = {
-347856.475, 356047.56, -1.0, 23.04,
1752, 0.0024575, 0.00000001, -248562.76,
1384.6, -7.2945676, 1000000000, -5786.47,
-347856.475, 356047.56, -1.0, 23.04,
0, 456.2489562, 3, -1,
-45786.476, 456.2489562, 34.00046, 45786.476
-347856.5, 356047.5, -1.0, 23.0625,
1752, 0.015625, 0.03125, -248562.75,
1384.5, -7.25, 1000000000, -5786.5,
-347856.75, 356047.75, -1.0, 23.03125,
0, 456.25, 3, -1,
-45786.5, 456, 34.03125, 45786.03125,
};
const float fs_f[] = {
0, 456.2489562, 3, -1,
1384.6, -7.2945676, 1000000000, -5786.47,
1752, 0.0024575, 0.1234, -248562.76,
-45786.476, 456.2489562, 34.00046, 45786.476,
1752065, 107, -45667.24, -7.2945676,
-347856.475, 356047.56, -1.0, 23.04
0, 456.25, 3, -1,
1384.5, -7.25, 1000000000, -5786.5,
1752, 0.015625, 0.03125, -248562.75,
-45786.5, 456, 34.03125, 45786.75,
1752065, 107, -45667.25, -7,
-347856.5, 356047.5, -1.0, 23.0625
};
const float ft_f[] = {
-45786.476, 456.2489562, 34.00046, 45786.476,
1752065, 107, -45667.24, -7.2945676,
-347856.475, 356047.56, -1.0, 23.04,
0, 456.2489562, 3, -1,
1384.6, -7.2945676, 1000000000, -5786.47,
1752, 0.0024575, 0.00000001, -248562.76
-4578.5, 456.25, 34.03125, 4578.75,
175, 107, -456.25, -7.25,
-3478.5, 356.5, -1.0, 23.0625,
0, 456.25, 3, -1,
1384.5, -7, 100, -5786.5,
1752, 0.015625, 0.03125, -248562.75
};
const int fs_w[] = {
@ -162,6 +162,6 @@ const long fs_l[] = {
0xffffffff, 356, 1000000, -5786,
-1, 24575, 10, -125458,
-486, 456, 34, 45786,
0, 1700000, -45667, -7,
0, 1700000, -45667, -7,
-347856, 0x80000000, 0xfffffff, 23,
};
};

View File

@ -1,4 +1,5 @@
#include <stdio.h>
#include <math.h>
#include "rounding_mode.h"
#include "macro_fpu.h"
@ -16,127 +17,134 @@ int arithmeticOperations(flt_art_op_t op)
switch(op) {
case ABSS:
UNOPff("abs.s");
printf("%s %.6g %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
printf("%s %f %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
break;
case ABSD:
UNOPdd("abs.d");
printf("%s %.13g %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
printf("%s %lf %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
break;
case ADDS:
BINOPf("add.s");
printf("%s %.6g %f %f\n",
printf("%s %f %f %f\n",
flt_art_op_names[op], fd_f, fs_f[i], ft_f[i]);
break;
case ADDD:
BINOPd("add.d");
printf("%s %.13g %lf %lf\n",
printf("%s %lf %lf %lf\n",
flt_art_op_names[op], fd_d, fs_d[i], ft_d[i]);
break;
case DIVS:
BINOPf("div.s");
printf("%s %.6g %f %f\n",
flt_art_op_names[op], fd_f, fs_f[i], ft_f[i]);
printf("%s %f %f %f\n",
flt_art_op_names[op], roundf(fd_f), fs_f[i], ft_f[i]);
break;
case DIVD:
BINOPd("div.d");
printf("%s %.13g %lf %lf\n",
flt_art_op_names[op], fd_d, fs_d[i], ft_d[i]);
printf("%s %lf %lf %lf\n",
flt_art_op_names[op], round(fd_d), fs_d[i], ft_d[i]);
break;
case MULS:
BINOPf("mul.s");
printf("%s %.6g %f %f\n",
flt_art_op_names[op], fd_f, fs_f[i], ft_f[i]);
printf("%s %f %f %f\n",
flt_art_op_names[op], roundf(fd_f), fs_f[i], ft_f[i]);
break;
case MULD:
BINOPd("mul.d");
printf("%s %.13g %lf %lf\n",
flt_art_op_names[op], fd_d, fs_d[i], ft_d[i]);
printf("%s %lf %lf %lf\n",
flt_art_op_names[op], round(fd_d), fs_d[i], ft_d[i]);
break;
case NEGS:
UNOPff("neg.s");
printf("%s %.6g %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
printf("%s %f %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
break;
case NEGD:
UNOPdd("neg.d");
printf("%s %.13g %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
printf("%s %lf %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
break;
case SQRTS:
UNOPff("sqrt.s");
printf("%s %.6g %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
printf("%s %f %f\n",
flt_art_op_names[op], roundf(fd_f), fs_f[i]);
break;
case SQRTD:
UNOPdd("sqrt.d");
printf("%s %.13g %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
printf("%s %lf %lf\n",
flt_art_op_names[op], round(fd_d), fs_d[i]);
break;
case SUBS:
BINOPf("sub.s");
printf("%s %.6g %f %f\n",
printf("%s %f %f %f\n",
flt_art_op_names[op], fd_f, fs_f[i], ft_f[i]);
break;
case SUBD:
BINOPd("sub.d");
printf("%s %.13g %lf %lf\n",
printf("%s %lf %lf %lf\n",
flt_art_op_names[op], fd_d, fs_d[i], ft_d[i]);
break;
case RECIPS:
UNOPff("recip.s");
printf("%s %.6g %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
printf("%s %f %f\n",
flt_art_op_names[op], roundf(fd_f), fs_f[i]);
break;
case RECIPD:
UNOPdd("recip.d");
printf("%s %.13g %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
printf("%s %lf %lf\n",
flt_art_op_names[op], round(fd_d), fs_d[i]);
break;
case RSQRTS:
if (fs_f[i] >= 0) {
UNOPff("rsqrt.s");
printf("%s %.6g %f\n", flt_art_op_names[op], fd_f, fs_f[i]);
printf("%s %f %f\n",
flt_art_op_names[op], roundf(fd_f), fs_f[i]);
}
break;
case RSQRTD:
if (fs_d[i] >= 0) {
UNOPdd("rsqrt.d");
printf("%s %.13g %lf\n", flt_art_op_names[op], fd_d, fs_d[i]);
printf("%s %lf %lf\n",
flt_art_op_names[op], round(fd_d), fs_d[i]);
}
break;
case MSUBS:
TRIOPf("msub.s");
printf("%s %.6g %f %f %f\n",
flt_art_op_names[op], fd_f, fr_f[i], fs_f[i], ft_f[i]);
printf("%s %f %f %f %f\n",flt_art_op_names[op], roundf(fd_f),
fr_f[i], fs_f[i], ft_f[i]);
break;
case MSUBD:
TRIOPd("msub.d");
printf("%s %.13g %lf %lf %lf\n",
flt_art_op_names[op], fd_d, fr_d[i], fs_d[i], ft_d[i]);
printf("%s %lf %lf %lf %lf\n", flt_art_op_names[op], round(fd_d),
fr_d[i], fs_d[i], ft_d[i]);
break;
case MADDS:
TRIOPf("madd.s");
printf("%s %.6g %f %f %f\n",
flt_art_op_names[op], fd_f, fr_f[i], fs_f[i], ft_f[i]);
printf("%s %f %f %f %f\n", flt_art_op_names[op], roundf(fd_f),
fr_f[i], fs_f[i], ft_f[i]);
break;
case MADDD:
TRIOPd("madd.d");
printf("%s %.13g %lf %lf %lf\n",
flt_art_op_names[op], fd_d, fr_d[i], fs_d[i], ft_d[i]);
printf("%s %lf %lf %lf %lf\n", flt_art_op_names[op], round(fd_d),
fr_d[i], fs_d[i], ft_d[i]);
break;
case NMADDS:
TRIOPf("nmadd.s");
printf("%s %.6g %f %f %f\n",
flt_art_op_names[op], fd_f, fr_f[i], fs_f[i], ft_f[i]);
printf("%s %f %f %f %f\n", flt_art_op_names[op], roundf(fd_f),
fr_f[i], fs_f[i], ft_f[i]);
break;
case NMADDD:
TRIOPd("nmadd.d");
printf("%s %.13g %lf %lf %lf\n",
flt_art_op_names[op], fd_d, fr_d[i], fs_d[i], ft_d[i]);
printf("%s %lf %lf %lf %lf\n", flt_art_op_names[op], round(fd_d),
fr_d[i], fs_d[i], ft_d[i]);
break;
case NMSUBS:
TRIOPf("nmsub.s");
printf("%s %.6g %f %f %f\n",
flt_art_op_names[op], fd_f, fr_f[i], fs_f[i], ft_f[i]);
printf("%s %f %f %f %f\n", flt_art_op_names[op], roundf(fd_f),
fr_f[i], fs_f[i], ft_f[i]);
break;
case NMSUBD:
TRIOPd("nmsub.d");
printf("%s %.13g %lf %lf %lf\n",
flt_art_op_names[op], fd_d, fr_d[i], fs_d[i], ft_d[i]);
printf("%s 0x%lf %lf %lf %lf\n", flt_art_op_names[op],
round(fd_d), fr_d[i], fs_d[i],
ft_d[i]);
break;
default:
printf("error\n");

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff