diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-09-10 17:58:27 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-09-10 17:58:27 +0200 |
commit | 70cc8540ed308d26b4c211a291fef66f942b8431 (patch) | |
tree | 7a486af46be48b984d679dae628cc1a5be6cc096 /test/mppa/instr/i32.c | |
parent | 61aefbc6413df9eaad1d1e93d8f4ea95ab8a0bcf (diff) | |
parent | 5b6c019a507688dfcf63b9ef54f7731137422ab5 (diff) | |
download | compcert-kvx-70cc8540ed308d26b4c211a291fef66f942b8431.tar.gz compcert-kvx-70cc8540ed308d26b4c211a291fef66f942b8431.zip |
Merge branch 'mppa-work' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-work
Diffstat (limited to 'test/mppa/instr/i32.c')
-rw-r--r-- | test/mppa/instr/i32.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/mppa/instr/i32.c b/test/mppa/instr/i32.c index 4e389620..e350931c 100644 --- a/test/mppa/instr/i32.c +++ b/test/mppa/instr/i32.c @@ -28,6 +28,7 @@ BEGIN_TEST(int) c = a+b; c += a&b; + /* testing if, cb version */ if ((a & 0x1) == 1) c += fact(1); else @@ -38,6 +39,11 @@ BEGIN_TEST(int) else c += fact(8); + if (a & 0x1 == 0) + c += fact(4); + else + c += fact(8); + b = !(a & 0x01); if (!b) c += fact(16); @@ -67,6 +73,48 @@ BEGIN_TEST(int) else c += fact(8192); + /* cmoved version */ + if ((a & 0x1) == 1) + c += 1; + else + c += 2; + + if (a & 0x1 == 0) + c += 4; + else + c += 8; + + if (a & 0x1 == 0) + c += 4; + else + c += 8; + + b = !(a & 0x01); + if (!b) + c += 16; + else + c += 32; + + 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); |