aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/instr/i32.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/mppa/instr/i32.c')
-rw-r--r--test/mppa/instr/i32.c48
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);