#include "rounding_mode.h"
#include "macro_fpu.h"
+#if defined(__mips_hard_float)
int arithmeticOperations(flt_art_op_t op)
{
double fd_d = 0;
}
return 0;
}
+#endif
int main()
{
+#if defined(__mips_hard_float)
flt_art_op_t op;
printf("-------------------------- %s --------------------------\n",
for (op = ABSS; op <= NMSUBD; op++) {
arithmeticOperations(op);
}
-
+#endif
return 0;
}
int main()
{
+#if defined(__mips_hard_float)
int i = 0;
printf("--- BC1F --- if fs == ft then " \
TESTINST_CONDs("c.ngt.s", i);
TESTINST_CONDd("c.ngt.d", i);
}
+#endif
return 0;
}
#include <stdio.h>
+#if defined(__mips_hard_float)
#define TESTINST_CFC1_CTC1(N) \
{ \
unsigned int out = 0; \
); \
printf("out=%d, in=%d\n", out, N); \
}
+#else
+#define TESTINST_CFC1_CTC1(N)
+#endif
int main()
{
int main()
{
+#if defined(__mips_hard_float)
int i;
int s1 = sizeof(int);
int s2 = sizeof(unsigned long long);
for (i = 0; i < (N-1)*s1; i = i+4) {
TEST6("swxc1", i);
}
+#endif
return 0;
}
int main()
{
+#if defined(__mips_hard_float)
int i, index;
unsigned long long outLoad;
for (i = 0; i < N * SOLL; i++) {
printf("i: %d, memSrc[%d]: 0x%llx, memDst[%d]: 0x%llx, outLoad: 0x%llx\n",
i, index, memSrc[index], index, memDst[index], outLoad);
}
+#endif
return 0;
}
"cvt.l.d", "cvt.s.l",
};
+#if defined(__mips_hard_float)
#define UNOPdd(op) \
fd_d = 0; \
__asm__ __volatile__( \
printf("%s, bc1f out=%f, fs=%f, ft=%f\n", \
instruction, outd, fs_d[i], ft_d[i]); \
}
+#endif
-347856.475, 23.04 -1.0, 356047.56
};
+#if defined(__mips_hard_float)
#define TEST1(mem) \
{ \
unsigned long long out; \
printf("%s :: RDval: 0x%x, RSval: 0x%x, out: 0x%lx\n", \
instruction, RDval, RSval, out); \
}
+#endif
int main()
{
+#if defined(__mips_hard_float)
int i;
init_reg_val2();
TEST5("movt", 0x5555ffff, 0xffffffff, t3, t1);
TEST5("movt", 0xeeeeeeee, 0xffffeeee, t3, t0);
}
-
+#endif
return 0;
}
#include "rounding_mode.h"
#include "macro_fpu.h"
+#if defined(__mips_hard_float)
int directedRoundingMode(flt_dir_op_t op) {
int fd_w = 0;
long long int fd_l = 0;
}
return 0;
}
+#endif
int main()
{
+#if defined(__mips_hard_float)
flt_dir_op_t op;
flt_round_op_t op1;
for (op1 = CVTDS; op1 <= CVTSL; op1++) {
FCSRRoundingMode(op1);
}
+#endif
return 0;
}
+#if defined(__mips_hard_float)
typedef enum {
TO_NEAREST=0,
TO_ZERO,
break;
}
}
+#endif
int main ()
{
+#if defined(__mips_hard_float)
long out [] = {0, 0};
__asm__ volatile("cfc1 $a1, $31" "\n\t"
"dli $t0, 0x405ee0a3d70a3d71" "\n\t"
: "a1", "a2", "t0", "$f0"
);
printf("FCSR::1: 0x%lx, 2: 0x%lx\n", out[0], out[1]);
+#endif
return 0;
}