From 4f45e2926fa9d0dba400ec6b6a1506c898cad13d Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 22 Mar 2019 11:10:11 +0100 Subject: Reorganized the test/mppa/ tests to have fewer of them --- test/mppa/instr/addw.c | 5 -- test/mppa/instr/andd.c | 5 -- test/mppa/instr/andw.c | 5 -- test/mppa/instr/branch.c | 10 --- test/mppa/instr/branchz.c | 10 --- test/mppa/instr/branchzu.c | 11 --- test/mppa/instr/call.c | 16 ---- test/mppa/instr/cast_S32_S64.c | 7 -- test/mppa/instr/cast_S64_U32.c | 7 -- test/mppa/instr/cast_U32_S64.c | 7 -- test/mppa/instr/cb.deqz.c | 10 --- test/mppa/instr/cb.dgez.c | 10 --- test/mppa/instr/cb.dgtz.c | 10 --- test/mppa/instr/cb.dlez.c | 10 --- test/mppa/instr/cb.dltz.c | 10 --- test/mppa/instr/cb.dnez.c | 10 --- test/mppa/instr/cb.wgez.c | 10 --- test/mppa/instr/cb.wgtz.c | 10 --- test/mppa/instr/cb.wlez.c | 10 --- test/mppa/instr/cb.wltz.c | 10 --- test/mppa/instr/compd.eq.c | 7 -- test/mppa/instr/compd.geu.c | 7 -- test/mppa/instr/compd.gt.c | 7 -- test/mppa/instr/compd.gtu.c | 7 -- test/mppa/instr/compd.le.c | 7 -- test/mppa/instr/compd.leu.c | 7 -- test/mppa/instr/compd.lt.c | 7 -- test/mppa/instr/compd.ltu.c | 7 -- test/mppa/instr/compd.ne.c | 7 -- test/mppa/instr/compw.eq.c | 7 -- test/mppa/instr/compw.geu.c | 7 -- test/mppa/instr/compw.gt.c | 7 -- test/mppa/instr/compw.gtu.c | 7 -- test/mppa/instr/compw.le.c | 7 -- test/mppa/instr/compw.leu.c | 7 -- test/mppa/instr/compw.lt.c | 7 -- test/mppa/instr/compw.ltu.c | 7 -- test/mppa/instr/compw.ne.c | 7 -- test/mppa/instr/div2.c | 7 -- test/mppa/instr/doubleconv.c | 9 --- test/mppa/instr/f32.c | 8 ++ test/mppa/instr/f64.c | 8 ++ test/mppa/instr/faddd.c | 5 -- test/mppa/instr/faddw.c | 5 -- test/mppa/instr/floatconv.c | 9 --- test/mppa/instr/fmuld.c | 7 -- test/mppa/instr/fmulw.c | 7 -- test/mppa/instr/fnegd.c | 7 -- test/mppa/instr/fnegw.c | 7 -- test/mppa/instr/for.c | 9 --- test/mppa/instr/forvar.c | 9 --- test/mppa/instr/forvarl.c | 10 --- test/mppa/instr/fsbfd.c | 7 -- test/mppa/instr/fsbfw.c | 7 -- test/mppa/instr/i32.c | 87 ++++++++++++++++++++ test/mppa/instr/i64.c | 107 +++++++++++++++++++++++++ test/mppa/instr/indirect_call.c | 33 -------- test/mppa/instr/indirect_tailcall.c | 33 -------- test/mppa/instr/individual/andw.c | 5 ++ test/mppa/instr/individual/branch.c | 10 +++ test/mppa/instr/individual/branchz.c | 10 +++ test/mppa/instr/individual/branchzu.c | 11 +++ test/mppa/instr/individual/call.c | 16 ++++ test/mppa/instr/individual/cast_S32_S64.c | 7 ++ test/mppa/instr/individual/cast_S64_U32.c | 7 ++ test/mppa/instr/individual/cb.deqz.c | 10 +++ test/mppa/instr/individual/cb.dgez.c | 10 +++ test/mppa/instr/individual/cb.dgtz.c | 10 +++ test/mppa/instr/individual/cb.dlez.c | 10 +++ test/mppa/instr/individual/cb.dltz.c | 10 +++ test/mppa/instr/individual/cb.dnez.c | 10 +++ test/mppa/instr/individual/cb.wgez.c | 10 +++ test/mppa/instr/individual/cb.wgtz.c | 10 +++ test/mppa/instr/individual/cb.wlez.c | 10 +++ test/mppa/instr/individual/cb.wltz.c | 10 +++ test/mppa/instr/individual/compd.eq.c | 7 ++ test/mppa/instr/individual/compd.geu.c | 7 ++ test/mppa/instr/individual/compd.gt.c | 7 ++ test/mppa/instr/individual/compd.le.c | 7 ++ test/mppa/instr/individual/compd.leu.c | 7 ++ test/mppa/instr/individual/compd.lt.c | 7 ++ test/mppa/instr/individual/compd.ltu.c | 7 ++ test/mppa/instr/individual/compd.ne.c | 7 ++ test/mppa/instr/individual/compw.eq.c | 7 ++ test/mppa/instr/individual/compw.geu.c | 7 ++ test/mppa/instr/individual/compw.gt.c | 7 ++ test/mppa/instr/individual/compw.gtu.c | 7 ++ test/mppa/instr/individual/compw.le.c | 7 ++ test/mppa/instr/individual/compw.leu.c | 7 ++ test/mppa/instr/individual/compw.lt.c | 7 ++ test/mppa/instr/individual/compw.ltu.c | 7 ++ test/mppa/instr/individual/compw.ne.c | 7 ++ test/mppa/instr/individual/div2.c | 7 ++ test/mppa/instr/individual/doubleconv.c | 9 +++ test/mppa/instr/individual/floatconv.c | 9 +++ test/mppa/instr/individual/fmuld.c | 7 ++ test/mppa/instr/individual/fmulw.c | 7 ++ test/mppa/instr/individual/fnegd.c | 7 ++ test/mppa/instr/individual/fnegw.c | 7 ++ test/mppa/instr/individual/for.c | 9 +++ test/mppa/instr/individual/forvar.c | 9 +++ test/mppa/instr/individual/forvarl.c | 10 +++ test/mppa/instr/individual/fsbfd.c | 7 ++ test/mppa/instr/individual/fsbfw.c | 7 ++ test/mppa/instr/individual/indirect_call.c | 33 ++++++++ test/mppa/instr/individual/indirect_tailcall.c | 33 ++++++++ test/mppa/instr/individual/lbs.c | 9 +++ test/mppa/instr/individual/lbz.c | 9 +++ test/mppa/instr/individual/muld.c | 7 ++ test/mppa/instr/individual/mulw.c | 7 ++ test/mppa/instr/individual/negd.c | 7 ++ test/mppa/instr/individual/ord.c | 7 ++ test/mppa/instr/individual/sbfd.c | 7 ++ test/mppa/instr/individual/sbfw.c | 7 ++ test/mppa/instr/individual/simple.c | 7 ++ test/mppa/instr/individual/sllw.c | 7 ++ test/mppa/instr/individual/srad.c | 7 ++ test/mppa/instr/individual/srld.c | 7 ++ test/mppa/instr/individual/tailcall.c | 16 ++++ test/mppa/instr/individual/udivd.c | 7 ++ test/mppa/instr/individual/umodd.c | 7 ++ test/mppa/instr/individual/xord.c | 7 ++ test/mppa/instr/lbs.c | 9 --- test/mppa/instr/lbz.c | 9 --- test/mppa/instr/muld.c | 7 -- test/mppa/instr/mulw.c | 7 -- test/mppa/instr/negd.c | 7 -- test/mppa/instr/ord.c | 7 -- test/mppa/instr/sbfd.c | 7 -- test/mppa/instr/sbfw.c | 7 -- test/mppa/instr/simple.c | 7 -- test/mppa/instr/sllw.c | 7 -- test/mppa/instr/srad.c | 7 -- test/mppa/instr/srld.c | 7 -- test/mppa/instr/tailcall.c | 16 ---- test/mppa/instr/udivd.c | 7 -- test/mppa/instr/ui32.c | 12 +++ test/mppa/instr/ui64.c | 10 +++ test/mppa/instr/umodd.c | 7 -- test/mppa/instr/xord.c | 7 -- test/mppa/interop/i32.c | 13 +++ test/mppa/interop/i64.c | 14 ++++ test/mppa/interop/i_manyiargs.c | 9 --- test/mppa/interop/i_multiiargs.c | 6 -- test/mppa/interop/i_oneiarg.c | 6 -- test/mppa/interop/individual/i_multiiargs.c | 6 ++ test/mppa/interop/individual/i_oneiarg.c | 6 ++ test/mppa/interop/individual/ll_multillargs.c | 7 ++ test/mppa/interop/individual/ll_onellarg.c | 7 ++ test/mppa/interop/individual/ll_void.c | 7 ++ test/mppa/interop/individual/void_void.c | 7 ++ test/mppa/interop/ll_manyllargs.c | 8 -- test/mppa/interop/ll_multillargs.c | 7 -- test/mppa/interop/ll_onellarg.c | 7 -- test/mppa/interop/ll_void.c | 7 -- test/mppa/interop/void_void.c | 7 -- 156 files changed, 870 insertions(+), 662 deletions(-) delete mode 100644 test/mppa/instr/addw.c delete mode 100644 test/mppa/instr/andd.c delete mode 100644 test/mppa/instr/andw.c delete mode 100644 test/mppa/instr/branch.c delete mode 100644 test/mppa/instr/branchz.c delete mode 100644 test/mppa/instr/branchzu.c delete mode 100644 test/mppa/instr/call.c delete mode 100644 test/mppa/instr/cast_S32_S64.c delete mode 100644 test/mppa/instr/cast_S64_U32.c delete mode 100644 test/mppa/instr/cast_U32_S64.c delete mode 100644 test/mppa/instr/cb.deqz.c delete mode 100644 test/mppa/instr/cb.dgez.c delete mode 100644 test/mppa/instr/cb.dgtz.c delete mode 100644 test/mppa/instr/cb.dlez.c delete mode 100644 test/mppa/instr/cb.dltz.c delete mode 100644 test/mppa/instr/cb.dnez.c delete mode 100644 test/mppa/instr/cb.wgez.c delete mode 100644 test/mppa/instr/cb.wgtz.c delete mode 100644 test/mppa/instr/cb.wlez.c delete mode 100644 test/mppa/instr/cb.wltz.c delete mode 100644 test/mppa/instr/compd.eq.c delete mode 100644 test/mppa/instr/compd.geu.c delete mode 100644 test/mppa/instr/compd.gt.c delete mode 100644 test/mppa/instr/compd.gtu.c delete mode 100644 test/mppa/instr/compd.le.c delete mode 100644 test/mppa/instr/compd.leu.c delete mode 100644 test/mppa/instr/compd.lt.c delete mode 100644 test/mppa/instr/compd.ltu.c delete mode 100644 test/mppa/instr/compd.ne.c delete mode 100644 test/mppa/instr/compw.eq.c delete mode 100644 test/mppa/instr/compw.geu.c delete mode 100644 test/mppa/instr/compw.gt.c delete mode 100644 test/mppa/instr/compw.gtu.c delete mode 100644 test/mppa/instr/compw.le.c delete mode 100644 test/mppa/instr/compw.leu.c delete mode 100644 test/mppa/instr/compw.lt.c delete mode 100644 test/mppa/instr/compw.ltu.c delete mode 100644 test/mppa/instr/compw.ne.c delete mode 100644 test/mppa/instr/div2.c delete mode 100644 test/mppa/instr/doubleconv.c create mode 100644 test/mppa/instr/f32.c create mode 100644 test/mppa/instr/f64.c delete mode 100644 test/mppa/instr/faddd.c delete mode 100644 test/mppa/instr/faddw.c delete mode 100644 test/mppa/instr/floatconv.c delete mode 100644 test/mppa/instr/fmuld.c delete mode 100644 test/mppa/instr/fmulw.c delete mode 100644 test/mppa/instr/fnegd.c delete mode 100644 test/mppa/instr/fnegw.c delete mode 100644 test/mppa/instr/for.c delete mode 100644 test/mppa/instr/forvar.c delete mode 100644 test/mppa/instr/forvarl.c delete mode 100644 test/mppa/instr/fsbfd.c delete mode 100644 test/mppa/instr/fsbfw.c create mode 100644 test/mppa/instr/i32.c create mode 100644 test/mppa/instr/i64.c delete mode 100644 test/mppa/instr/indirect_call.c delete mode 100644 test/mppa/instr/indirect_tailcall.c create mode 100644 test/mppa/instr/individual/andw.c create mode 100644 test/mppa/instr/individual/branch.c create mode 100644 test/mppa/instr/individual/branchz.c create mode 100644 test/mppa/instr/individual/branchzu.c create mode 100644 test/mppa/instr/individual/call.c create mode 100644 test/mppa/instr/individual/cast_S32_S64.c create mode 100644 test/mppa/instr/individual/cast_S64_U32.c create mode 100644 test/mppa/instr/individual/cb.deqz.c create mode 100644 test/mppa/instr/individual/cb.dgez.c create mode 100644 test/mppa/instr/individual/cb.dgtz.c create mode 100644 test/mppa/instr/individual/cb.dlez.c create mode 100644 test/mppa/instr/individual/cb.dltz.c create mode 100644 test/mppa/instr/individual/cb.dnez.c create mode 100644 test/mppa/instr/individual/cb.wgez.c create mode 100644 test/mppa/instr/individual/cb.wgtz.c create mode 100644 test/mppa/instr/individual/cb.wlez.c create mode 100644 test/mppa/instr/individual/cb.wltz.c create mode 100644 test/mppa/instr/individual/compd.eq.c create mode 100644 test/mppa/instr/individual/compd.geu.c create mode 100644 test/mppa/instr/individual/compd.gt.c create mode 100644 test/mppa/instr/individual/compd.le.c create mode 100644 test/mppa/instr/individual/compd.leu.c create mode 100644 test/mppa/instr/individual/compd.lt.c create mode 100644 test/mppa/instr/individual/compd.ltu.c create mode 100644 test/mppa/instr/individual/compd.ne.c create mode 100644 test/mppa/instr/individual/compw.eq.c create mode 100644 test/mppa/instr/individual/compw.geu.c create mode 100644 test/mppa/instr/individual/compw.gt.c create mode 100644 test/mppa/instr/individual/compw.gtu.c create mode 100644 test/mppa/instr/individual/compw.le.c create mode 100644 test/mppa/instr/individual/compw.leu.c create mode 100644 test/mppa/instr/individual/compw.lt.c create mode 100644 test/mppa/instr/individual/compw.ltu.c create mode 100644 test/mppa/instr/individual/compw.ne.c create mode 100644 test/mppa/instr/individual/div2.c create mode 100644 test/mppa/instr/individual/doubleconv.c create mode 100644 test/mppa/instr/individual/floatconv.c create mode 100644 test/mppa/instr/individual/fmuld.c create mode 100644 test/mppa/instr/individual/fmulw.c create mode 100644 test/mppa/instr/individual/fnegd.c create mode 100644 test/mppa/instr/individual/fnegw.c create mode 100644 test/mppa/instr/individual/for.c create mode 100644 test/mppa/instr/individual/forvar.c create mode 100644 test/mppa/instr/individual/forvarl.c create mode 100644 test/mppa/instr/individual/fsbfd.c create mode 100644 test/mppa/instr/individual/fsbfw.c create mode 100644 test/mppa/instr/individual/indirect_call.c create mode 100644 test/mppa/instr/individual/indirect_tailcall.c create mode 100644 test/mppa/instr/individual/lbs.c create mode 100644 test/mppa/instr/individual/lbz.c create mode 100644 test/mppa/instr/individual/muld.c create mode 100644 test/mppa/instr/individual/mulw.c create mode 100644 test/mppa/instr/individual/negd.c create mode 100644 test/mppa/instr/individual/ord.c create mode 100644 test/mppa/instr/individual/sbfd.c create mode 100644 test/mppa/instr/individual/sbfw.c create mode 100644 test/mppa/instr/individual/simple.c create mode 100644 test/mppa/instr/individual/sllw.c create mode 100644 test/mppa/instr/individual/srad.c create mode 100644 test/mppa/instr/individual/srld.c create mode 100644 test/mppa/instr/individual/tailcall.c create mode 100644 test/mppa/instr/individual/udivd.c create mode 100644 test/mppa/instr/individual/umodd.c create mode 100644 test/mppa/instr/individual/xord.c delete mode 100644 test/mppa/instr/lbs.c delete mode 100644 test/mppa/instr/lbz.c delete mode 100644 test/mppa/instr/muld.c delete mode 100644 test/mppa/instr/mulw.c delete mode 100644 test/mppa/instr/negd.c delete mode 100644 test/mppa/instr/ord.c delete mode 100644 test/mppa/instr/sbfd.c delete mode 100644 test/mppa/instr/sbfw.c delete mode 100644 test/mppa/instr/simple.c delete mode 100644 test/mppa/instr/sllw.c delete mode 100644 test/mppa/instr/srad.c delete mode 100644 test/mppa/instr/srld.c delete mode 100644 test/mppa/instr/tailcall.c delete mode 100644 test/mppa/instr/udivd.c create mode 100644 test/mppa/instr/ui32.c create mode 100644 test/mppa/instr/ui64.c delete mode 100644 test/mppa/instr/umodd.c delete mode 100644 test/mppa/instr/xord.c create mode 100644 test/mppa/interop/i32.c create mode 100644 test/mppa/interop/i64.c delete mode 100644 test/mppa/interop/i_manyiargs.c delete mode 100644 test/mppa/interop/i_multiiargs.c delete mode 100644 test/mppa/interop/i_oneiarg.c create mode 100644 test/mppa/interop/individual/i_multiiargs.c create mode 100644 test/mppa/interop/individual/i_oneiarg.c create mode 100644 test/mppa/interop/individual/ll_multillargs.c create mode 100644 test/mppa/interop/individual/ll_onellarg.c create mode 100644 test/mppa/interop/individual/ll_void.c create mode 100644 test/mppa/interop/individual/void_void.c delete mode 100644 test/mppa/interop/ll_manyllargs.c delete mode 100644 test/mppa/interop/ll_multillargs.c delete mode 100644 test/mppa/interop/ll_onellarg.c delete mode 100644 test/mppa/interop/ll_void.c delete mode 100644 test/mppa/interop/void_void.c (limited to 'test/mppa') diff --git a/test/mppa/instr/addw.c b/test/mppa/instr/addw.c deleted file mode 100644 index e22024cf..00000000 --- a/test/mppa/instr/addw.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) - c = a+b; -END_TEST32() diff --git a/test/mppa/instr/andd.c b/test/mppa/instr/andd.c deleted file mode 100644 index e3221bd7..00000000 --- a/test/mppa/instr/andd.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) - c = a&b; -END_TEST64() diff --git a/test/mppa/instr/andw.c b/test/mppa/instr/andw.c deleted file mode 100644 index 799dc7fb..00000000 --- a/test/mppa/instr/andw.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) - c = a&b; -END_TEST32() diff --git a/test/mppa/instr/branch.c b/test/mppa/instr/branch.c deleted file mode 100644 index c9937e31..00000000 --- a/test/mppa/instr/branch.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - if ((a & 0x1) == 1) - c = 0; - else - c = 1; -} -END_TEST32() diff --git a/test/mppa/instr/branchz.c b/test/mppa/instr/branchz.c deleted file mode 100644 index d3e021b5..00000000 --- a/test/mppa/instr/branchz.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - if (a & 0x1 == 0) - c = 0; - else - c = 1; -} -END_TEST32() diff --git a/test/mppa/instr/branchzu.c b/test/mppa/instr/branchzu.c deleted file mode 100644 index d0169174..00000000 --- a/test/mppa/instr/branchzu.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - b = !(a & 0x01); - if (!b) - c = 0; - else - c = 1; -} -END_TEST32() diff --git a/test/mppa/instr/call.c b/test/mppa/instr/call.c deleted file mode 100644 index ba2ec323..00000000 --- a/test/mppa/instr/call.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "framework.h" - -int sum(int a, int b){ - return a+b; -} - -int make(int a){ - return a; -} - -BEGIN_TEST(int) -{ - c = sum(make(a), make(b)); -} -END_TEST32() -/* RETURN VALUE: 60 */ diff --git a/test/mppa/instr/cast_S32_S64.c b/test/mppa/instr/cast_S32_S64.c deleted file mode 100644 index 09c97e00..00000000 --- a/test/mppa/instr/cast_S32_S64.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = (long long) a; -} -END_TEST32() diff --git a/test/mppa/instr/cast_S64_U32.c b/test/mppa/instr/cast_S64_U32.c deleted file mode 100644 index 2d9dc723..00000000 --- a/test/mppa/instr/cast_S64_U32.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = (unsigned int) a; -} -END_TEST64() diff --git a/test/mppa/instr/cast_U32_S64.c b/test/mppa/instr/cast_U32_S64.c deleted file mode 100644 index 6f9cd059..00000000 --- a/test/mppa/instr/cast_U32_S64.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned int) -{ - c = (long long) a; -} -END_TEST32() diff --git a/test/mppa/instr/cb.deqz.c b/test/mppa/instr/cb.deqz.c deleted file mode 100644 index 6da2ab07..00000000 --- a/test/mppa/instr/cb.deqz.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - if (0 != (a & 0x1LL)) - c = 1; - else - c = 0; -} -END_TEST64() diff --git a/test/mppa/instr/cb.dgez.c b/test/mppa/instr/cb.dgez.c deleted file mode 100644 index 7bef25ad..00000000 --- a/test/mppa/instr/cb.dgez.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - if (0 > (a & 0x1LL)) - c = 1; - else - c = 0; -} -END_TEST64() diff --git a/test/mppa/instr/cb.dgtz.c b/test/mppa/instr/cb.dgtz.c deleted file mode 100644 index 1a43fb1f..00000000 --- a/test/mppa/instr/cb.dgtz.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - if (0 >= (a & 0x1LL) - 1) - c = 1; - else - c = 0; -} -END_TEST64() diff --git a/test/mppa/instr/cb.dlez.c b/test/mppa/instr/cb.dlez.c deleted file mode 100644 index 2fb97939..00000000 --- a/test/mppa/instr/cb.dlez.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - if (a & 0x1LL > 0) - c = 1; - else - c = 0; -} -END_TEST64() diff --git a/test/mppa/instr/cb.dltz.c b/test/mppa/instr/cb.dltz.c deleted file mode 100644 index a431d5d0..00000000 --- a/test/mppa/instr/cb.dltz.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - if ((a & 0x1LL) - 1 >= 0) - c = 1; - else - c = 0; -} -END_TEST64() diff --git a/test/mppa/instr/cb.dnez.c b/test/mppa/instr/cb.dnez.c deleted file mode 100644 index 44516cbe..00000000 --- a/test/mppa/instr/cb.dnez.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - if (0 == (a & 0x1LL)) - c = 1; - else - c = 0; -} -END_TEST64() diff --git a/test/mppa/instr/cb.wgez.c b/test/mppa/instr/cb.wgez.c deleted file mode 100644 index 5779ad92..00000000 --- a/test/mppa/instr/cb.wgez.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - if (0 > (a & 0x1) - 1) - c = 1; - else - c = 0; -} -END_TEST32() diff --git a/test/mppa/instr/cb.wgtz.c b/test/mppa/instr/cb.wgtz.c deleted file mode 100644 index abb695bd..00000000 --- a/test/mppa/instr/cb.wgtz.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - if (0 >= (a & 0x1)) - c = 1; - else - c = 0; -} -END_TEST32() diff --git a/test/mppa/instr/cb.wlez.c b/test/mppa/instr/cb.wlez.c deleted file mode 100644 index 3a2e08c1..00000000 --- a/test/mppa/instr/cb.wlez.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - if ((a & 0x1) > 0) - c = 1; - else - c = 0; -} -END_TEST32() diff --git a/test/mppa/instr/cb.wltz.c b/test/mppa/instr/cb.wltz.c deleted file mode 100644 index 5d52c72a..00000000 --- a/test/mppa/instr/cb.wltz.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - if ((a & 0x1) - 1 >= 0) - c = 1; - else - c = 0; -} -END_TEST32() diff --git a/test/mppa/instr/compd.eq.c b/test/mppa/instr/compd.eq.c deleted file mode 100644 index 4fe8de2a..00000000 --- a/test/mppa/instr/compd.eq.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = ((a & 0x1LL) == (b & 0x1LL)); -} -END_TEST64() diff --git a/test/mppa/instr/compd.geu.c b/test/mppa/instr/compd.geu.c deleted file mode 100644 index fccf0804..00000000 --- a/test/mppa/instr/compd.geu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = (a >= b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.gt.c b/test/mppa/instr/compd.gt.c deleted file mode 100644 index b9901436..00000000 --- a/test/mppa/instr/compd.gt.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = (a > b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.gtu.c b/test/mppa/instr/compd.gtu.c deleted file mode 100644 index 7b2b96a6..00000000 --- a/test/mppa/instr/compd.gtu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = (a > b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.le.c b/test/mppa/instr/compd.le.c deleted file mode 100644 index 6fa0f103..00000000 --- a/test/mppa/instr/compd.le.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = (a <= b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.leu.c b/test/mppa/instr/compd.leu.c deleted file mode 100644 index 1ad18281..00000000 --- a/test/mppa/instr/compd.leu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = (a <= b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.lt.c b/test/mppa/instr/compd.lt.c deleted file mode 100644 index c42cda56..00000000 --- a/test/mppa/instr/compd.lt.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = (a < b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.ltu.c b/test/mppa/instr/compd.ltu.c deleted file mode 100644 index b03d4d53..00000000 --- a/test/mppa/instr/compd.ltu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = (a < b); -} -END_TEST64() diff --git a/test/mppa/instr/compd.ne.c b/test/mppa/instr/compd.ne.c deleted file mode 100644 index fd9d0b28..00000000 --- a/test/mppa/instr/compd.ne.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = ((a & 0x1ULL) != (b & 0x1ULL)); -} -END_TEST64() diff --git a/test/mppa/instr/compw.eq.c b/test/mppa/instr/compw.eq.c deleted file mode 100644 index cd93f365..00000000 --- a/test/mppa/instr/compw.eq.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = ((a & 0x1) == (b & 0x1)); -} -END_TEST32() diff --git a/test/mppa/instr/compw.geu.c b/test/mppa/instr/compw.geu.c deleted file mode 100644 index b8fb1adf..00000000 --- a/test/mppa/instr/compw.geu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned int) -{ - c = (a >= b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.gt.c b/test/mppa/instr/compw.gt.c deleted file mode 100644 index 5f6bc907..00000000 --- a/test/mppa/instr/compw.gt.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = (a > b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.gtu.c b/test/mppa/instr/compw.gtu.c deleted file mode 100644 index 947f6a14..00000000 --- a/test/mppa/instr/compw.gtu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned int) -{ - c = (a > b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.le.c b/test/mppa/instr/compw.le.c deleted file mode 100644 index 35ec6b7d..00000000 --- a/test/mppa/instr/compw.le.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = (a <= b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.leu.c b/test/mppa/instr/compw.leu.c deleted file mode 100644 index 74ebfb42..00000000 --- a/test/mppa/instr/compw.leu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned int) -{ - c = (a <= b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.lt.c b/test/mppa/instr/compw.lt.c deleted file mode 100644 index cb1f30bd..00000000 --- a/test/mppa/instr/compw.lt.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = (a < b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.ltu.c b/test/mppa/instr/compw.ltu.c deleted file mode 100644 index 6a0c5af1..00000000 --- a/test/mppa/instr/compw.ltu.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned int) -{ - c = (a < b); -} -END_TEST32() diff --git a/test/mppa/instr/compw.ne.c b/test/mppa/instr/compw.ne.c deleted file mode 100644 index 7035e2c7..00000000 --- a/test/mppa/instr/compw.ne.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned int) -{ - c = ((a & 0x1U) != (b & 0x1U)); -} -END_TEST32() diff --git a/test/mppa/instr/div2.c b/test/mppa/instr/div2.c deleted file mode 100644 index b5dfe63a..00000000 --- a/test/mppa/instr/div2.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = (a + b) / 2; -} -END_TEST32() diff --git a/test/mppa/instr/doubleconv.c b/test/mppa/instr/doubleconv.c deleted file mode 100644 index 55b1ddab..00000000 --- a/test/mppa/instr/doubleconv.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" - -double long2double(long v){ - return v; -} - -BEGIN_TEST(long) - c = (long) long2double(a) + (long) long2double(b) + (long) long2double(42.3); -END_TEST64() diff --git a/test/mppa/instr/f32.c b/test/mppa/instr/f32.c new file mode 100644 index 00000000..7e304aeb --- /dev/null +++ b/test/mppa/instr/f32.c @@ -0,0 +1,8 @@ +#include "framework.h" + +BEGIN_TEST(float) + c = ((float)a + (float)b); + c += ((float)a * (float)b); + c += (-(float)a); + c += ((float)a - (float)b); +END_TESTF32() diff --git a/test/mppa/instr/f64.c b/test/mppa/instr/f64.c new file mode 100644 index 00000000..be8094c9 --- /dev/null +++ b/test/mppa/instr/f64.c @@ -0,0 +1,8 @@ +#include "framework.h" + +BEGIN_TEST(double) + c = ((double)a + (double)b); + c += ((double)a * (double)b); + c += (-(double)a); + c += ((double)a - (double)b); +END_TESTF64() diff --git a/test/mppa/instr/faddd.c b/test/mppa/instr/faddd.c deleted file mode 100644 index 35b7fc92..00000000 --- a/test/mppa/instr/faddd.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(double) - c = ((double)a + (double)b); -END_TESTF64() diff --git a/test/mppa/instr/faddw.c b/test/mppa/instr/faddw.c deleted file mode 100644 index e0e635ae..00000000 --- a/test/mppa/instr/faddw.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(float) - c = ((float)a + (float)b); -END_TESTF32() diff --git a/test/mppa/instr/floatconv.c b/test/mppa/instr/floatconv.c deleted file mode 100644 index 32b798e1..00000000 --- a/test/mppa/instr/floatconv.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" - -float int2float(int v){ - return v; -} - -BEGIN_TEST(int) - c = (int) int2float(a) + (int) int2float(b) + (int) int2float(42.3); -END_TEST32() diff --git a/test/mppa/instr/fmuld.c b/test/mppa/instr/fmuld.c deleted file mode 100644 index 03c990fa..00000000 --- a/test/mppa/instr/fmuld.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(double) -{ - c = ((double)a * (double)b); -} -END_TESTF64() diff --git a/test/mppa/instr/fmulw.c b/test/mppa/instr/fmulw.c deleted file mode 100644 index f85eba64..00000000 --- a/test/mppa/instr/fmulw.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(float) -{ - c = ((float)a * (float)b); -} -END_TESTF32() diff --git a/test/mppa/instr/fnegd.c b/test/mppa/instr/fnegd.c deleted file mode 100644 index 974eb7e8..00000000 --- a/test/mppa/instr/fnegd.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(double) -{ - c = (-(double)a); -} -END_TESTF64() diff --git a/test/mppa/instr/fnegw.c b/test/mppa/instr/fnegw.c deleted file mode 100644 index fbeaab8e..00000000 --- a/test/mppa/instr/fnegw.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(float) -{ - c = (-(float)a); -} -END_TESTF64() diff --git a/test/mppa/instr/for.c b/test/mppa/instr/for.c deleted file mode 100644 index 373ab6bd..00000000 --- a/test/mppa/instr/for.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - int j; - for (j = 0 ; j < 10 ; j++) - c += a; -} -END_TEST32() diff --git a/test/mppa/instr/forvar.c b/test/mppa/instr/forvar.c deleted file mode 100644 index 9e43c198..00000000 --- a/test/mppa/instr/forvar.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - int k; - for (k = 0 ; k < (b & 0x8) ; k++) - c += a; -} -END_TEST32() diff --git a/test/mppa/instr/forvarl.c b/test/mppa/instr/forvarl.c deleted file mode 100644 index c1fe90fd..00000000 --- a/test/mppa/instr/forvarl.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long int) -{ - int j; - - for (j = 0 ; j < (b & 0x8LL) ; j++) - c += a; -} -END_TEST64() diff --git a/test/mppa/instr/fsbfd.c b/test/mppa/instr/fsbfd.c deleted file mode 100644 index f80c1efe..00000000 --- a/test/mppa/instr/fsbfd.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(double) -{ - c = ((double)a - (double)b); -} -END_TESTF64() diff --git a/test/mppa/instr/fsbfw.c b/test/mppa/instr/fsbfw.c deleted file mode 100644 index 067c40b5..00000000 --- a/test/mppa/instr/fsbfw.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(float) -{ - c = ((float)a - (float)b); -} -END_TESTF64() diff --git a/test/mppa/instr/i32.c b/test/mppa/instr/i32.c new file mode 100644 index 00000000..c48531b1 --- /dev/null +++ b/test/mppa/instr/i32.c @@ -0,0 +1,87 @@ +#include "framework.h" + +int sum(int a, int b){ + return a+b; +} + +int make(int a){ + return a; +} + +int tailsum(int a, int b){ + return make(a+b); +} + +float int2float(int v){ + return v; +} + +BEGIN_TEST(int) + c = a+b; + c += a&b; + + if ((a & 0x1) == 1) + c += 1; + else + c += 2; + + if (a & 0x1 == 0) + c += 4; + else + c += 8; + + b = !(a & 0x01); + if (!b) + c += 16; + else + c += 32; + + c += sum(make(a), make(b)); + c += (long long) a; + + if (0 > (a & 0x1) - 1) + c += 64; + else + c += 128; + + if (0 >= (a & 0x1)) + c += 256; + else + c += 512; + + if ((a & 0x1) > 0) + c += 1024; + else + c += 2048; + + if ((a & 0x1) - 1 >= 0) + c += 4096; + else + c += 8192; + + c += ((a & 0x1) == (b & 0x1)); + c += (a > b); + c += (a <= b); + c += (a < b); + c += (a + b) / 2; + c += (int) int2float(a) + (int) int2float(b) + (int) int2float(42.3); + + int j; + for (j = 0 ; j < 10 ; j++) + c += a; + int k; + for (k = 0 ; k < (b & 0x8) ; k++) + c += a; + + char s[] = "Tome and Cherry at the playa\n"; + c += s[(a & (sizeof(s)-1))]; + + unsigned char s2[] = "Tim is sorry at the playa\n"; + c += s2[a & (sizeof(s) - 1)]; + + c += a*b; + c += a-b; + c += a << (b & 0x8); + + c += sum(a, b); +END_TEST32() diff --git a/test/mppa/instr/i64.c b/test/mppa/instr/i64.c new file mode 100644 index 00000000..00eb159d --- /dev/null +++ b/test/mppa/instr/i64.c @@ -0,0 +1,107 @@ +#include "framework.h" + +long long sum(long long a, long long b){ + return a+b; +} + +long long diff(long long a, long long b){ + return a-b; +} + +long long mul(long long a, long long b){ + return a*b; +} + +long long make(long long a){ + return a; +} + +long long random_op(long long a, long long b){ + long long d = 3; + long long (*op)(long long, long long); + + if (a % d == 0) + op = sum; + else if (a % d == 1) + op = diff; + else + op = mul; + + return op(a, b); +} + +double long2double(long v){ + return v; +} + +BEGIN_TEST(long long) + c = a&b; + c += a*b; + c += -a; + c += a | b; + c += a-b; + c += a >> (b & 0x8LL); + c += a >> (b & 0x8ULL); + c += a % b; + + long long d = 3; + long long (*op)(long long, long long); + + if (a % d == 0) + op = sum; + else if (a % d == 1) + op = diff; + else + op = mul; + + c += op(make(a), make(b)); + c += random_op(a, b); + c += a/b; + c += a^b; + c += (unsigned int) a; + + if (0 != (a & 0x1LL)) + c += 1; + else + c += 2; + + if (0 > (a & 0x1LL)) + c += 4; + else + c += 8; + + if (0 >= (a & 0x1LL) - 1) + c += 16; + else + c += 32; + + if (a & 0x1LL > 0) + c += 64; + else + c += 128; + + if ((a & 0x1LL) - 1 >= 0) + c += 256; + else + c += 512; + + if (0 == (a & 0x1LL)) + c += 1024; + else + c += 2048; + + c += ((a & 0x1LL) == (b & 0x1LL)); + c += (a >= b); + c += (a > b); + c += (a <= b); + c += (a < b); + c += (long) long2double(a) + (long) long2double(b) + (long) long2double(42.3); + + int j; + + for (j = 0 ; j < (b & 0x8LL) ; j++) + c += a; + + c += ((a & 0x1LL) == (b & 0x1LL)); + +END_TEST64() diff --git a/test/mppa/instr/indirect_call.c b/test/mppa/instr/indirect_call.c deleted file mode 100644 index f376c00a..00000000 --- a/test/mppa/instr/indirect_call.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "framework.h" - -long long sum(long long a, long long b){ - return a+b; -} - -long long diff(long long a, long long b){ - return a-b; -} - -long long mul(long long a, long long b){ - return a*b; -} - -long long make(long long a){ - return a; -} - -BEGIN_TEST(long long) -{ - long long d = 3; - long long (*op)(long long, long long); - - if (a % d == 0) - op = sum; - else if (a % d == 1) - op = diff; - else - op = mul; - - c += op(make(a), make(b)); -} -END_TEST64() diff --git a/test/mppa/instr/indirect_tailcall.c b/test/mppa/instr/indirect_tailcall.c deleted file mode 100644 index e6c16ea1..00000000 --- a/test/mppa/instr/indirect_tailcall.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "framework.h" - -long long sum(long long a, long long b){ - return a+b; -} - -long long diff(long long a, long long b){ - return a-b; -} - -long long mul(long long a, long long b){ - return a*b; -} - -long long random_op(long long a, long long b){ - long long d = 3; - long long (*op)(long long, long long); - - if (a % d == 0) - op = sum; - else if (a % d == 1) - op = diff; - else - op = mul; - - return op(a, b); -} - -BEGIN_TEST(long long) -{ - c += random_op(a, b); -} -END_TEST64() diff --git a/test/mppa/instr/individual/andw.c b/test/mppa/instr/individual/andw.c new file mode 100644 index 00000000..799dc7fb --- /dev/null +++ b/test/mppa/instr/individual/andw.c @@ -0,0 +1,5 @@ +#include "framework.h" + +BEGIN_TEST(int) + c = a&b; +END_TEST32() diff --git a/test/mppa/instr/individual/branch.c b/test/mppa/instr/individual/branch.c new file mode 100644 index 00000000..c9937e31 --- /dev/null +++ b/test/mppa/instr/individual/branch.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + if ((a & 0x1) == 1) + c = 0; + else + c = 1; +} +END_TEST32() diff --git a/test/mppa/instr/individual/branchz.c b/test/mppa/instr/individual/branchz.c new file mode 100644 index 00000000..d3e021b5 --- /dev/null +++ b/test/mppa/instr/individual/branchz.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + if (a & 0x1 == 0) + c = 0; + else + c = 1; +} +END_TEST32() diff --git a/test/mppa/instr/individual/branchzu.c b/test/mppa/instr/individual/branchzu.c new file mode 100644 index 00000000..d0169174 --- /dev/null +++ b/test/mppa/instr/individual/branchzu.c @@ -0,0 +1,11 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + b = !(a & 0x01); + if (!b) + c = 0; + else + c = 1; +} +END_TEST32() diff --git a/test/mppa/instr/individual/call.c b/test/mppa/instr/individual/call.c new file mode 100644 index 00000000..ba2ec323 --- /dev/null +++ b/test/mppa/instr/individual/call.c @@ -0,0 +1,16 @@ +#include "framework.h" + +int sum(int a, int b){ + return a+b; +} + +int make(int a){ + return a; +} + +BEGIN_TEST(int) +{ + c = sum(make(a), make(b)); +} +END_TEST32() +/* RETURN VALUE: 60 */ diff --git a/test/mppa/instr/individual/cast_S32_S64.c b/test/mppa/instr/individual/cast_S32_S64.c new file mode 100644 index 00000000..09c97e00 --- /dev/null +++ b/test/mppa/instr/individual/cast_S32_S64.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = (long long) a; +} +END_TEST32() diff --git a/test/mppa/instr/individual/cast_S64_U32.c b/test/mppa/instr/individual/cast_S64_U32.c new file mode 100644 index 00000000..2d9dc723 --- /dev/null +++ b/test/mppa/instr/individual/cast_S64_U32.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = (unsigned int) a; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.deqz.c b/test/mppa/instr/individual/cb.deqz.c new file mode 100644 index 00000000..6da2ab07 --- /dev/null +++ b/test/mppa/instr/individual/cb.deqz.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + if (0 != (a & 0x1LL)) + c = 1; + else + c = 0; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.dgez.c b/test/mppa/instr/individual/cb.dgez.c new file mode 100644 index 00000000..7bef25ad --- /dev/null +++ b/test/mppa/instr/individual/cb.dgez.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + if (0 > (a & 0x1LL)) + c = 1; + else + c = 0; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.dgtz.c b/test/mppa/instr/individual/cb.dgtz.c new file mode 100644 index 00000000..1a43fb1f --- /dev/null +++ b/test/mppa/instr/individual/cb.dgtz.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + if (0 >= (a & 0x1LL) - 1) + c = 1; + else + c = 0; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.dlez.c b/test/mppa/instr/individual/cb.dlez.c new file mode 100644 index 00000000..2fb97939 --- /dev/null +++ b/test/mppa/instr/individual/cb.dlez.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + if (a & 0x1LL > 0) + c = 1; + else + c = 0; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.dltz.c b/test/mppa/instr/individual/cb.dltz.c new file mode 100644 index 00000000..a431d5d0 --- /dev/null +++ b/test/mppa/instr/individual/cb.dltz.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + if ((a & 0x1LL) - 1 >= 0) + c = 1; + else + c = 0; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.dnez.c b/test/mppa/instr/individual/cb.dnez.c new file mode 100644 index 00000000..44516cbe --- /dev/null +++ b/test/mppa/instr/individual/cb.dnez.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + if (0 == (a & 0x1LL)) + c = 1; + else + c = 0; +} +END_TEST64() diff --git a/test/mppa/instr/individual/cb.wgez.c b/test/mppa/instr/individual/cb.wgez.c new file mode 100644 index 00000000..5779ad92 --- /dev/null +++ b/test/mppa/instr/individual/cb.wgez.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + if (0 > (a & 0x1) - 1) + c = 1; + else + c = 0; +} +END_TEST32() diff --git a/test/mppa/instr/individual/cb.wgtz.c b/test/mppa/instr/individual/cb.wgtz.c new file mode 100644 index 00000000..abb695bd --- /dev/null +++ b/test/mppa/instr/individual/cb.wgtz.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + if (0 >= (a & 0x1)) + c = 1; + else + c = 0; +} +END_TEST32() diff --git a/test/mppa/instr/individual/cb.wlez.c b/test/mppa/instr/individual/cb.wlez.c new file mode 100644 index 00000000..3a2e08c1 --- /dev/null +++ b/test/mppa/instr/individual/cb.wlez.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + if ((a & 0x1) > 0) + c = 1; + else + c = 0; +} +END_TEST32() diff --git a/test/mppa/instr/individual/cb.wltz.c b/test/mppa/instr/individual/cb.wltz.c new file mode 100644 index 00000000..5d52c72a --- /dev/null +++ b/test/mppa/instr/individual/cb.wltz.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + if ((a & 0x1) - 1 >= 0) + c = 1; + else + c = 0; +} +END_TEST32() diff --git a/test/mppa/instr/individual/compd.eq.c b/test/mppa/instr/individual/compd.eq.c new file mode 100644 index 00000000..4fe8de2a --- /dev/null +++ b/test/mppa/instr/individual/compd.eq.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = ((a & 0x1LL) == (b & 0x1LL)); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.geu.c b/test/mppa/instr/individual/compd.geu.c new file mode 100644 index 00000000..fccf0804 --- /dev/null +++ b/test/mppa/instr/individual/compd.geu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = (a >= b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.gt.c b/test/mppa/instr/individual/compd.gt.c new file mode 100644 index 00000000..b9901436 --- /dev/null +++ b/test/mppa/instr/individual/compd.gt.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = (a > b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.le.c b/test/mppa/instr/individual/compd.le.c new file mode 100644 index 00000000..6fa0f103 --- /dev/null +++ b/test/mppa/instr/individual/compd.le.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = (a <= b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.leu.c b/test/mppa/instr/individual/compd.leu.c new file mode 100644 index 00000000..1ad18281 --- /dev/null +++ b/test/mppa/instr/individual/compd.leu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = (a <= b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.lt.c b/test/mppa/instr/individual/compd.lt.c new file mode 100644 index 00000000..c42cda56 --- /dev/null +++ b/test/mppa/instr/individual/compd.lt.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = (a < b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.ltu.c b/test/mppa/instr/individual/compd.ltu.c new file mode 100644 index 00000000..b03d4d53 --- /dev/null +++ b/test/mppa/instr/individual/compd.ltu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = (a < b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compd.ne.c b/test/mppa/instr/individual/compd.ne.c new file mode 100644 index 00000000..fd9d0b28 --- /dev/null +++ b/test/mppa/instr/individual/compd.ne.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = ((a & 0x1ULL) != (b & 0x1ULL)); +} +END_TEST64() diff --git a/test/mppa/instr/individual/compw.eq.c b/test/mppa/instr/individual/compw.eq.c new file mode 100644 index 00000000..cd93f365 --- /dev/null +++ b/test/mppa/instr/individual/compw.eq.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = ((a & 0x1) == (b & 0x1)); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.geu.c b/test/mppa/instr/individual/compw.geu.c new file mode 100644 index 00000000..b8fb1adf --- /dev/null +++ b/test/mppa/instr/individual/compw.geu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned int) +{ + c = (a >= b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.gt.c b/test/mppa/instr/individual/compw.gt.c new file mode 100644 index 00000000..5f6bc907 --- /dev/null +++ b/test/mppa/instr/individual/compw.gt.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = (a > b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.gtu.c b/test/mppa/instr/individual/compw.gtu.c new file mode 100644 index 00000000..947f6a14 --- /dev/null +++ b/test/mppa/instr/individual/compw.gtu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned int) +{ + c = (a > b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.le.c b/test/mppa/instr/individual/compw.le.c new file mode 100644 index 00000000..35ec6b7d --- /dev/null +++ b/test/mppa/instr/individual/compw.le.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = (a <= b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.leu.c b/test/mppa/instr/individual/compw.leu.c new file mode 100644 index 00000000..74ebfb42 --- /dev/null +++ b/test/mppa/instr/individual/compw.leu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned int) +{ + c = (a <= b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.lt.c b/test/mppa/instr/individual/compw.lt.c new file mode 100644 index 00000000..cb1f30bd --- /dev/null +++ b/test/mppa/instr/individual/compw.lt.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = (a < b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.ltu.c b/test/mppa/instr/individual/compw.ltu.c new file mode 100644 index 00000000..6a0c5af1 --- /dev/null +++ b/test/mppa/instr/individual/compw.ltu.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned int) +{ + c = (a < b); +} +END_TEST32() diff --git a/test/mppa/instr/individual/compw.ne.c b/test/mppa/instr/individual/compw.ne.c new file mode 100644 index 00000000..7035e2c7 --- /dev/null +++ b/test/mppa/instr/individual/compw.ne.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned int) +{ + c = ((a & 0x1U) != (b & 0x1U)); +} +END_TEST32() diff --git a/test/mppa/instr/individual/div2.c b/test/mppa/instr/individual/div2.c new file mode 100644 index 00000000..b5dfe63a --- /dev/null +++ b/test/mppa/instr/individual/div2.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = (a + b) / 2; +} +END_TEST32() diff --git a/test/mppa/instr/individual/doubleconv.c b/test/mppa/instr/individual/doubleconv.c new file mode 100644 index 00000000..55b1ddab --- /dev/null +++ b/test/mppa/instr/individual/doubleconv.c @@ -0,0 +1,9 @@ +#include "framework.h" + +double long2double(long v){ + return v; +} + +BEGIN_TEST(long) + c = (long) long2double(a) + (long) long2double(b) + (long) long2double(42.3); +END_TEST64() diff --git a/test/mppa/instr/individual/floatconv.c b/test/mppa/instr/individual/floatconv.c new file mode 100644 index 00000000..32b798e1 --- /dev/null +++ b/test/mppa/instr/individual/floatconv.c @@ -0,0 +1,9 @@ +#include "framework.h" + +float int2float(int v){ + return v; +} + +BEGIN_TEST(int) + c = (int) int2float(a) + (int) int2float(b) + (int) int2float(42.3); +END_TEST32() diff --git a/test/mppa/instr/individual/fmuld.c b/test/mppa/instr/individual/fmuld.c new file mode 100644 index 00000000..03c990fa --- /dev/null +++ b/test/mppa/instr/individual/fmuld.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(double) +{ + c = ((double)a * (double)b); +} +END_TESTF64() diff --git a/test/mppa/instr/individual/fmulw.c b/test/mppa/instr/individual/fmulw.c new file mode 100644 index 00000000..f85eba64 --- /dev/null +++ b/test/mppa/instr/individual/fmulw.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(float) +{ + c = ((float)a * (float)b); +} +END_TESTF32() diff --git a/test/mppa/instr/individual/fnegd.c b/test/mppa/instr/individual/fnegd.c new file mode 100644 index 00000000..974eb7e8 --- /dev/null +++ b/test/mppa/instr/individual/fnegd.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(double) +{ + c = (-(double)a); +} +END_TESTF64() diff --git a/test/mppa/instr/individual/fnegw.c b/test/mppa/instr/individual/fnegw.c new file mode 100644 index 00000000..fbeaab8e --- /dev/null +++ b/test/mppa/instr/individual/fnegw.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(float) +{ + c = (-(float)a); +} +END_TESTF64() diff --git a/test/mppa/instr/individual/for.c b/test/mppa/instr/individual/for.c new file mode 100644 index 00000000..373ab6bd --- /dev/null +++ b/test/mppa/instr/individual/for.c @@ -0,0 +1,9 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + int j; + for (j = 0 ; j < 10 ; j++) + c += a; +} +END_TEST32() diff --git a/test/mppa/instr/individual/forvar.c b/test/mppa/instr/individual/forvar.c new file mode 100644 index 00000000..9e43c198 --- /dev/null +++ b/test/mppa/instr/individual/forvar.c @@ -0,0 +1,9 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + int k; + for (k = 0 ; k < (b & 0x8) ; k++) + c += a; +} +END_TEST32() diff --git a/test/mppa/instr/individual/forvarl.c b/test/mppa/instr/individual/forvarl.c new file mode 100644 index 00000000..c1fe90fd --- /dev/null +++ b/test/mppa/instr/individual/forvarl.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(long long int) +{ + int j; + + for (j = 0 ; j < (b & 0x8LL) ; j++) + c += a; +} +END_TEST64() diff --git a/test/mppa/instr/individual/fsbfd.c b/test/mppa/instr/individual/fsbfd.c new file mode 100644 index 00000000..f80c1efe --- /dev/null +++ b/test/mppa/instr/individual/fsbfd.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(double) +{ + c = ((double)a - (double)b); +} +END_TESTF64() diff --git a/test/mppa/instr/individual/fsbfw.c b/test/mppa/instr/individual/fsbfw.c new file mode 100644 index 00000000..067c40b5 --- /dev/null +++ b/test/mppa/instr/individual/fsbfw.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(float) +{ + c = ((float)a - (float)b); +} +END_TESTF64() diff --git a/test/mppa/instr/individual/indirect_call.c b/test/mppa/instr/individual/indirect_call.c new file mode 100644 index 00000000..f376c00a --- /dev/null +++ b/test/mppa/instr/individual/indirect_call.c @@ -0,0 +1,33 @@ +#include "framework.h" + +long long sum(long long a, long long b){ + return a+b; +} + +long long diff(long long a, long long b){ + return a-b; +} + +long long mul(long long a, long long b){ + return a*b; +} + +long long make(long long a){ + return a; +} + +BEGIN_TEST(long long) +{ + long long d = 3; + long long (*op)(long long, long long); + + if (a % d == 0) + op = sum; + else if (a % d == 1) + op = diff; + else + op = mul; + + c += op(make(a), make(b)); +} +END_TEST64() diff --git a/test/mppa/instr/individual/indirect_tailcall.c b/test/mppa/instr/individual/indirect_tailcall.c new file mode 100644 index 00000000..e6c16ea1 --- /dev/null +++ b/test/mppa/instr/individual/indirect_tailcall.c @@ -0,0 +1,33 @@ +#include "framework.h" + +long long sum(long long a, long long b){ + return a+b; +} + +long long diff(long long a, long long b){ + return a-b; +} + +long long mul(long long a, long long b){ + return a*b; +} + +long long random_op(long long a, long long b){ + long long d = 3; + long long (*op)(long long, long long); + + if (a % d == 0) + op = sum; + else if (a % d == 1) + op = diff; + else + op = mul; + + return op(a, b); +} + +BEGIN_TEST(long long) +{ + c += random_op(a, b); +} +END_TEST64() diff --git a/test/mppa/instr/individual/lbs.c b/test/mppa/instr/individual/lbs.c new file mode 100644 index 00000000..22a50632 --- /dev/null +++ b/test/mppa/instr/individual/lbs.c @@ -0,0 +1,9 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + char s[] = "Tome and Cherry at the playa\n"; + + c = s[(a & (sizeof(s)-1))]; +} +END_TEST32() diff --git a/test/mppa/instr/individual/lbz.c b/test/mppa/instr/individual/lbz.c new file mode 100644 index 00000000..04ba098d --- /dev/null +++ b/test/mppa/instr/individual/lbz.c @@ -0,0 +1,9 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + unsigned char s[] = "Tim is sorry at the playa\n"; + + c = s[a & (sizeof(s) - 1)]; +} +END_TEST32() diff --git a/test/mppa/instr/individual/muld.c b/test/mppa/instr/individual/muld.c new file mode 100644 index 00000000..f7e23850 --- /dev/null +++ b/test/mppa/instr/individual/muld.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = a*b; +} +END_TEST64() diff --git a/test/mppa/instr/individual/mulw.c b/test/mppa/instr/individual/mulw.c new file mode 100644 index 00000000..a91d966e --- /dev/null +++ b/test/mppa/instr/individual/mulw.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = a * b; +} +END_TEST32() diff --git a/test/mppa/instr/individual/negd.c b/test/mppa/instr/individual/negd.c new file mode 100644 index 00000000..837b9828 --- /dev/null +++ b/test/mppa/instr/individual/negd.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = -a; +} +END_TEST64() diff --git a/test/mppa/instr/individual/ord.c b/test/mppa/instr/individual/ord.c new file mode 100644 index 00000000..cae1ae8b --- /dev/null +++ b/test/mppa/instr/individual/ord.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = a | b; +} +END_TEST64() diff --git a/test/mppa/instr/individual/sbfd.c b/test/mppa/instr/individual/sbfd.c new file mode 100644 index 00000000..77c28c77 --- /dev/null +++ b/test/mppa/instr/individual/sbfd.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = a-b; +} +END_TEST64() diff --git a/test/mppa/instr/individual/sbfw.c b/test/mppa/instr/individual/sbfw.c new file mode 100644 index 00000000..e38a1fff --- /dev/null +++ b/test/mppa/instr/individual/sbfw.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = a-b; +} +END_TEST32() diff --git a/test/mppa/instr/individual/simple.c b/test/mppa/instr/individual/simple.c new file mode 100644 index 00000000..944f09c9 --- /dev/null +++ b/test/mppa/instr/individual/simple.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = a+b; +} +END_TEST32() diff --git a/test/mppa/instr/individual/sllw.c b/test/mppa/instr/individual/sllw.c new file mode 100644 index 00000000..6dd41a6c --- /dev/null +++ b/test/mppa/instr/individual/sllw.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(int) +{ + c = a << (b & 0x8); +} +END_TEST32() diff --git a/test/mppa/instr/individual/srad.c b/test/mppa/instr/individual/srad.c new file mode 100644 index 00000000..00be9d0c --- /dev/null +++ b/test/mppa/instr/individual/srad.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = a >> (b & 0x8LL); +} +END_TEST64() diff --git a/test/mppa/instr/individual/srld.c b/test/mppa/instr/individual/srld.c new file mode 100644 index 00000000..14970efd --- /dev/null +++ b/test/mppa/instr/individual/srld.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = a >> (b & 0x8ULL); +} +END_TEST64() diff --git a/test/mppa/instr/individual/tailcall.c b/test/mppa/instr/individual/tailcall.c new file mode 100644 index 00000000..6c659a01 --- /dev/null +++ b/test/mppa/instr/individual/tailcall.c @@ -0,0 +1,16 @@ +#include "framework.h" + +int make(int a){ + return a; +} + +int sum(int a, int b){ + return make(a+b); +} + +BEGIN_TEST(int) +{ + c = sum(a, b); +} +END_TEST32() +/* RETURN VALUE: 60 */ diff --git a/test/mppa/instr/individual/udivd.c b/test/mppa/instr/individual/udivd.c new file mode 100644 index 00000000..cfb31881 --- /dev/null +++ b/test/mppa/instr/individual/udivd.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = a/b; +} +END_TEST64() diff --git a/test/mppa/instr/individual/umodd.c b/test/mppa/instr/individual/umodd.c new file mode 100644 index 00000000..a7f25f1c --- /dev/null +++ b/test/mppa/instr/individual/umodd.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = a%b; +} +END_TEST64() diff --git a/test/mppa/instr/individual/xord.c b/test/mppa/instr/individual/xord.c new file mode 100644 index 00000000..b6a90cb0 --- /dev/null +++ b/test/mppa/instr/individual/xord.c @@ -0,0 +1,7 @@ +#include "framework.h" + +BEGIN_TEST(long long) +{ + c = a^b; +} +END_TEST64() diff --git a/test/mppa/instr/lbs.c b/test/mppa/instr/lbs.c deleted file mode 100644 index 22a50632..00000000 --- a/test/mppa/instr/lbs.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - char s[] = "Tome and Cherry at the playa\n"; - - c = s[(a & (sizeof(s)-1))]; -} -END_TEST32() diff --git a/test/mppa/instr/lbz.c b/test/mppa/instr/lbz.c deleted file mode 100644 index 04ba098d..00000000 --- a/test/mppa/instr/lbz.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - unsigned char s[] = "Tim is sorry at the playa\n"; - - c = s[a & (sizeof(s) - 1)]; -} -END_TEST32() diff --git a/test/mppa/instr/muld.c b/test/mppa/instr/muld.c deleted file mode 100644 index f7e23850..00000000 --- a/test/mppa/instr/muld.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = a*b; -} -END_TEST64() diff --git a/test/mppa/instr/mulw.c b/test/mppa/instr/mulw.c deleted file mode 100644 index a91d966e..00000000 --- a/test/mppa/instr/mulw.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = a * b; -} -END_TEST32() diff --git a/test/mppa/instr/negd.c b/test/mppa/instr/negd.c deleted file mode 100644 index 837b9828..00000000 --- a/test/mppa/instr/negd.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = -a; -} -END_TEST64() diff --git a/test/mppa/instr/ord.c b/test/mppa/instr/ord.c deleted file mode 100644 index cae1ae8b..00000000 --- a/test/mppa/instr/ord.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = a | b; -} -END_TEST64() diff --git a/test/mppa/instr/sbfd.c b/test/mppa/instr/sbfd.c deleted file mode 100644 index 77c28c77..00000000 --- a/test/mppa/instr/sbfd.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = a-b; -} -END_TEST64() diff --git a/test/mppa/instr/sbfw.c b/test/mppa/instr/sbfw.c deleted file mode 100644 index e38a1fff..00000000 --- a/test/mppa/instr/sbfw.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = a-b; -} -END_TEST32() diff --git a/test/mppa/instr/simple.c b/test/mppa/instr/simple.c deleted file mode 100644 index 944f09c9..00000000 --- a/test/mppa/instr/simple.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = a+b; -} -END_TEST32() diff --git a/test/mppa/instr/sllw.c b/test/mppa/instr/sllw.c deleted file mode 100644 index 6dd41a6c..00000000 --- a/test/mppa/instr/sllw.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(int) -{ - c = a << (b & 0x8); -} -END_TEST32() diff --git a/test/mppa/instr/srad.c b/test/mppa/instr/srad.c deleted file mode 100644 index 00be9d0c..00000000 --- a/test/mppa/instr/srad.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = a >> (b & 0x8LL); -} -END_TEST64() diff --git a/test/mppa/instr/srld.c b/test/mppa/instr/srld.c deleted file mode 100644 index 14970efd..00000000 --- a/test/mppa/instr/srld.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = a >> (b & 0x8ULL); -} -END_TEST64() diff --git a/test/mppa/instr/tailcall.c b/test/mppa/instr/tailcall.c deleted file mode 100644 index 6c659a01..00000000 --- a/test/mppa/instr/tailcall.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "framework.h" - -int make(int a){ - return a; -} - -int sum(int a, int b){ - return make(a+b); -} - -BEGIN_TEST(int) -{ - c = sum(a, b); -} -END_TEST32() -/* RETURN VALUE: 60 */ diff --git a/test/mppa/instr/udivd.c b/test/mppa/instr/udivd.c deleted file mode 100644 index cfb31881..00000000 --- a/test/mppa/instr/udivd.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = a/b; -} -END_TEST64() diff --git a/test/mppa/instr/ui32.c b/test/mppa/instr/ui32.c new file mode 100644 index 00000000..f56a9b95 --- /dev/null +++ b/test/mppa/instr/ui32.c @@ -0,0 +1,12 @@ +#include "framework.h" + +BEGIN_TEST(unsigned int) +{ + c = (long long) a; + c += (a >= b); + c += (a > b); + c += (a <= b); + c += (a < b); + c += ((a & 0x1U) != (b & 0x1U)); +} +END_TEST32() diff --git a/test/mppa/instr/ui64.c b/test/mppa/instr/ui64.c new file mode 100644 index 00000000..908dec3c --- /dev/null +++ b/test/mppa/instr/ui64.c @@ -0,0 +1,10 @@ +#include "framework.h" + +BEGIN_TEST(unsigned long long) +{ + c = (a > b); + c += (a <= b); + c += (a < b); + c += ((a & 0x1ULL) != (b & 0x1ULL)); +} +END_TEST64() diff --git a/test/mppa/instr/umodd.c b/test/mppa/instr/umodd.c deleted file mode 100644 index a7f25f1c..00000000 --- a/test/mppa/instr/umodd.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(unsigned long long) -{ - c = a%b; -} -END_TEST64() diff --git a/test/mppa/instr/xord.c b/test/mppa/instr/xord.c deleted file mode 100644 index b6a90cb0..00000000 --- a/test/mppa/instr/xord.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" - -BEGIN_TEST(long long) -{ - c = a^b; -} -END_TEST64() diff --git a/test/mppa/interop/i32.c b/test/mppa/interop/i32.c new file mode 100644 index 00000000..6bc2705c --- /dev/null +++ b/test/mppa/interop/i32.c @@ -0,0 +1,13 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(int) + c = i_manyiargs(a, b, a-b, a+b, a*2, b*2, a*2-b, a+b*2, (a-b)*2, (a+b)*2, + -2*a, -2*b, a-b, a+b, a*3, b*3, a*3-b, a+b*3, (a-b)*3, (a+b)*3, + -3*a, -3*b, a-b, a+b, a*4, b*4, a*4-b, a+b*4, (a-b)*4, (a+b)*4); + c += i_multiiargs(a, b, a-b, a+b); + c += i_oneiarg(a); + void_void(); + c += a; +END_TEST32() + diff --git a/test/mppa/interop/i64.c b/test/mppa/interop/i64.c new file mode 100644 index 00000000..3e7240f7 --- /dev/null +++ b/test/mppa/interop/i64.c @@ -0,0 +1,14 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(long long) + c = ll_manyllargs(a, b, a-b, a+b, a*2, b*2, a*2-b, a+b*2, (a-b)*2, (a+b)*2, + -2*a, -2*b, a-b, a+b, a*3, b*3, a*3-b, a+b*3, (a-b)*3, (a+b)*3, + -3*a, -3*b, a-b, a+b, a*4, b*4, a*4-b, a+b*4, (a-b)*4, (a+b)*4); + c += ll_multillargs(a, b, a-b, a+b); + c += ll_onellarg(a); + c = ll_void(); + c += a; + void_void(); + c += a; +END_TEST64() diff --git a/test/mppa/interop/i_manyiargs.c b/test/mppa/interop/i_manyiargs.c deleted file mode 100644 index d674c26f..00000000 --- a/test/mppa/interop/i_manyiargs.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(int) - c = i_manyiargs(a, b, a-b, a+b, a*2, b*2, a*2-b, a+b*2, (a-b)*2, (a+b)*2, - -2*a, -2*b, a-b, a+b, a*3, b*3, a*3-b, a+b*3, (a-b)*3, (a+b)*3, - -3*a, -3*b, a-b, a+b, a*4, b*4, a*4-b, a+b*4, (a-b)*4, (a+b)*4); -END_TEST() - diff --git a/test/mppa/interop/i_multiiargs.c b/test/mppa/interop/i_multiiargs.c deleted file mode 100644 index 0e8c8936..00000000 --- a/test/mppa/interop/i_multiiargs.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(int) - c = i_multiiargs(a, b, a-b, a+b); -END_TEST() diff --git a/test/mppa/interop/i_oneiarg.c b/test/mppa/interop/i_oneiarg.c deleted file mode 100644 index 42cd1540..00000000 --- a/test/mppa/interop/i_oneiarg.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(int) - c = i_oneiarg(a); -END_TEST() diff --git a/test/mppa/interop/individual/i_multiiargs.c b/test/mppa/interop/individual/i_multiiargs.c new file mode 100644 index 00000000..888742b5 --- /dev/null +++ b/test/mppa/interop/individual/i_multiiargs.c @@ -0,0 +1,6 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(int) + c = i_multiiargs(a, b, a-b, a+b); +END_TEST32() diff --git a/test/mppa/interop/individual/i_oneiarg.c b/test/mppa/interop/individual/i_oneiarg.c new file mode 100644 index 00000000..9c969fb8 --- /dev/null +++ b/test/mppa/interop/individual/i_oneiarg.c @@ -0,0 +1,6 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(int) + c = i_oneiarg(a); +END_TEST32() diff --git a/test/mppa/interop/individual/ll_multillargs.c b/test/mppa/interop/individual/ll_multillargs.c new file mode 100644 index 00000000..34b422eb --- /dev/null +++ b/test/mppa/interop/individual/ll_multillargs.c @@ -0,0 +1,7 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(long long) + c = ll_multillargs(a, b, a-b, a+b); +END_TEST64() + diff --git a/test/mppa/interop/individual/ll_onellarg.c b/test/mppa/interop/individual/ll_onellarg.c new file mode 100644 index 00000000..a2fbbbe9 --- /dev/null +++ b/test/mppa/interop/individual/ll_onellarg.c @@ -0,0 +1,7 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(long long) + c = ll_onellarg(a); +END_TEST64() + diff --git a/test/mppa/interop/individual/ll_void.c b/test/mppa/interop/individual/ll_void.c new file mode 100644 index 00000000..da128fdd --- /dev/null +++ b/test/mppa/interop/individual/ll_void.c @@ -0,0 +1,7 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(long long) + c = ll_void(); + c += a; +END_TEST64() diff --git a/test/mppa/interop/individual/void_void.c b/test/mppa/interop/individual/void_void.c new file mode 100644 index 00000000..976a721b --- /dev/null +++ b/test/mppa/interop/individual/void_void.c @@ -0,0 +1,7 @@ +#include "framework.h" +#include "common.h" + +BEGIN_TEST(long long) + void_void(); + c = a; +END_TEST64() diff --git a/test/mppa/interop/ll_manyllargs.c b/test/mppa/interop/ll_manyllargs.c deleted file mode 100644 index 6e0b3b36..00000000 --- a/test/mppa/interop/ll_manyllargs.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(long long) - c = ll_manyllargs(a, b, a-b, a+b, a*2, b*2, a*2-b, a+b*2, (a-b)*2, (a+b)*2, - -2*a, -2*b, a-b, a+b, a*3, b*3, a*3-b, a+b*3, (a-b)*3, (a+b)*3, - -3*a, -3*b, a-b, a+b, a*4, b*4, a*4-b, a+b*4, (a-b)*4, (a+b)*4); -END_TEST() diff --git a/test/mppa/interop/ll_multillargs.c b/test/mppa/interop/ll_multillargs.c deleted file mode 100644 index edb03b12..00000000 --- a/test/mppa/interop/ll_multillargs.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(long long) - c = ll_multillargs(a, b, a-b, a+b); -END_TEST() - diff --git a/test/mppa/interop/ll_onellarg.c b/test/mppa/interop/ll_onellarg.c deleted file mode 100644 index 0d182166..00000000 --- a/test/mppa/interop/ll_onellarg.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(long long) - c = ll_onellarg(a); -END_TEST() - diff --git a/test/mppa/interop/ll_void.c b/test/mppa/interop/ll_void.c deleted file mode 100644 index fa350c9b..00000000 --- a/test/mppa/interop/ll_void.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(long long) - c = ll_void(); - c += a; -END_TEST() diff --git a/test/mppa/interop/void_void.c b/test/mppa/interop/void_void.c deleted file mode 100644 index e729edb2..00000000 --- a/test/mppa/interop/void_void.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "framework.h" -#include "common.h" - -BEGIN_TEST(long long) - void_void(); - c = a; -END_TEST() -- cgit