aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/instr/framework.h
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-11-13 11:44:56 +0100
committerCyril SIX <cyril.six@kalray.eu>2018-11-13 11:44:56 +0100
commitd15b2c014daf547e10504278ae42d4651dc71319 (patch)
tree51e639c72c8d9b902621f1c27baf869da263d57e /test/mppa/instr/framework.h
parentf24d303df6cb125ca19b953bb364955cc6e8c246 (diff)
downloadcompcert-kvx-d15b2c014daf547e10504278ae42d4651dc71319.tar.gz
compcert-kvx-d15b2c014daf547e10504278ae42d4651dc71319.zip
Revamped the instruction testsuite (all instructions work except umodd and udivd)
Diffstat (limited to 'test/mppa/instr/framework.h')
-rw-r--r--test/mppa/instr/framework.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/mppa/instr/framework.h b/test/mppa/instr/framework.h
new file mode 100644
index 00000000..f6077c46
--- /dev/null
+++ b/test/mppa/instr/framework.h
@@ -0,0 +1,26 @@
+#ifndef __FRAMEWORK_H__
+#define __FRAMEWORK_H__
+
+#include "../prng/prng.c"
+
+#define BEGIN_TEST(type)\
+ int main(void){\
+ type a, b, c, i, S;\
+ srand(0);\
+ S = 0;\
+ for (i = 0 ; i < 100 ; i++){\
+ c = randlong();\
+ a = randlong();\
+ b = randlong();
+ /* END BEGIN_TEST */
+
+/* In between BEGIN_TEST and END_TEST : definition of c */
+
+#define END_TEST()\
+ S += c;\
+ }\
+ return S;\
+ }
+ /* END END_TEST */
+
+#endif