aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-04-03 17:07:09 +0200
committerCyril SIX <cyril.six@kalray.eu>2018-04-04 16:30:10 +0200
commit69813ed0107cd76caa322db5e1df1b7b969b7012 (patch)
tree0a76a650c77d08556a6d0850f6f0b3259d94f210 /test/mppa
parent8d196f0f3193758a6371d9eb539af350202e0f4f (diff)
downloadcompcert-kvx-69813ed0107cd76caa322db5e1df1b7b969b7012.tar.gz
compcert-kvx-69813ed0107cd76caa322db5e1df1b7b969b7012.zip
MPPA - 32-bits immediate eq/neq branches
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;
+}