aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/Makefile4
-rw-r--r--test/mppa/branch.c12
2 files changed, 14 insertions, 2 deletions
diff --git a/test/mppa/Makefile b/test/mppa/Makefile
index 9078bdb9..e73dcb38 100644
--- a/test/mppa/Makefile
+++ b/test/mppa/Makefile
@@ -1,4 +1,4 @@
-ELF=simple.bin call.bin
+ELF=simple.bin call.bin branch.bin
DEBUG:=$(if $(DEBUG),"-dall",)
all: $(ELF)
@@ -8,7 +8,7 @@ all: $(ELF)
.SECONDARY:
%.s: %.c
- ccomp $(DEBUG) -v -S $< -o $@
+ ccomp $(DEBUG) -O0 -v -S $< -o $@
.PHONY:
clean:
diff --git a/test/mppa/branch.c b/test/mppa/branch.c
new file mode 100644
index 00000000..dee15568
--- /dev/null
+++ b/test/mppa/branch.c
@@ -0,0 +1,12 @@
+int main(void){
+ int a=1;
+ int b;
+
+ if(a){
+ b = a+4;
+ } else {
+ b = a+2;
+ }
+
+ return b;
+}