aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/instr/framework.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/mppa/instr/framework.h')
-rw-r--r--test/mppa/instr/framework.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/test/mppa/instr/framework.h b/test/mppa/instr/framework.h
index d1c652bd..d4f36f6b 100644
--- a/test/mppa/instr/framework.h
+++ b/test/mppa/instr/framework.h
@@ -1,10 +1,9 @@
#ifndef __FRAMEWORK_H__
#define __FRAMEWORK_H__
+#include <stdio.h>
#include "../prng/prng.c"
-int printf(const char *, ...);
-
#define BEGIN_TEST_N(type, N)\
int main(void){\
type t[N], c, i, j, S;\
@@ -18,7 +17,8 @@ int printf(const char *, ...);
#define BEGIN_TEST(type)\
int main(void){\
- type a, b, c, i, S;\
+ type a, b, c, S;\
+ int i;\
srand(0);\
S = 0;\
for (i = 0 ; i < 100 ; i++){\
@@ -29,22 +29,38 @@ int printf(const char *, ...);
/* In between BEGIN_TEST and END_TEST : definition of c */
-#define END_TEST()\
- printf("%llu\n", c);\
+#define END_TEST64()\
+ printf("%llu\t%llu\t%llu\n", a, b, c);\
S += c;\
}\
return S;\
}
- /* END END_TEST */
+ /* END END_TEST64 */
#define END_TEST32()\
- printf("%u\n", c);\
+ printf("%u\t%u\t%u\n", a, b, c);\
S += c;\
}\
return S;\
}
/* END END_TEST32 */
+#define END_TESTF32()\
+ printf("%f\t%f\t%f\n", a, b, c);\
+ S += c;\
+ }\
+ return 0;\
+ }
+ /* END END_TESTF32 */
+
+#define END_TESTF64()\
+ printf("%lf\t%lf\t%lf\n", a, b, c);\
+ S += c;\
+ }\
+ return 0;\
+ }
+ /* END END_TESTF64 */
+
#endif