aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/Makefile2
-rw-r--r--test/mppa/general/branchz.c12
-rw-r--r--test/mppa/general/branchzu.c12
-rw-r--r--test/mppa/general/output/branchz.exp1
-rw-r--r--test/mppa/general/output/branchzu.exp1
5 files changed, 27 insertions, 1 deletions
diff --git a/test/mppa/Makefile b/test/mppa/Makefile
index 60433f03..36bd49bc 100644
--- a/test/mppa/Makefile
+++ b/test/mppa/Makefile
@@ -1,5 +1,5 @@
DIR=general
-TESTNAMES=simple call branch for forvar forvarl
+TESTNAMES=simple call branch for forvar forvarl branchz branchzu
TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
ELF=$(addsuffix .bin,$(TESTS))
diff --git a/test/mppa/general/branchz.c b/test/mppa/general/branchz.c
new file mode 100644
index 00000000..5e3226d5
--- /dev/null
+++ b/test/mppa/general/branchz.c
@@ -0,0 +1,12 @@
+int main(void){
+ int a=1;
+ int b;
+
+ if(a==0){
+ b = a+4;
+ } else {
+ b = a+2;
+ }
+
+ return b;
+}
diff --git a/test/mppa/general/branchzu.c b/test/mppa/general/branchzu.c
new file mode 100644
index 00000000..0ff25763
--- /dev/null
+++ b/test/mppa/general/branchzu.c
@@ -0,0 +1,12 @@
+int main(void){
+ int a=1;
+ int b;
+
+ if(!a){
+ b = a+4;
+ } else {
+ b = a+2;
+ }
+
+ return b;
+}
diff --git a/test/mppa/general/output/branchz.exp b/test/mppa/general/output/branchz.exp
new file mode 100644
index 00000000..00750edc
--- /dev/null
+++ b/test/mppa/general/output/branchz.exp
@@ -0,0 +1 @@
+3
diff --git a/test/mppa/general/output/branchzu.exp b/test/mppa/general/output/branchzu.exp
new file mode 100644
index 00000000..00750edc
--- /dev/null
+++ b/test/mppa/general/output/branchzu.exp
@@ -0,0 +1 @@
+3