aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-19 22:13:53 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-19 22:13:53 +0100
commit4cc5324db73dd014bcd2c118f5769f88e52f8643 (patch)
tree6f3df7b011f34f2cdaa8381342756708f7b02e49 /test
parentf321f75979d18ab99f226b2c5d6bbb59bffb5cac (diff)
parent2af07d6a328f73a32bc2c768e3108dd3db393ed1 (diff)
downloadcompcert-kvx-4cc5324db73dd014bcd2c118f5769f88e52f8643.tar.gz
compcert-kvx-4cc5324db73dd014bcd2c118f5769f88e52f8643.zip
Merge branch 'mppa-madd' into mppa_postpass
Diffstat (limited to 'test')
-rw-r--r--test/monniaux/madd/madd.c11
-rw-r--r--test/monniaux/madd/madd_run.c9
2 files changed, 20 insertions, 0 deletions
diff --git a/test/monniaux/madd/madd.c b/test/monniaux/madd/madd.c
new file mode 100644
index 00000000..f847edf3
--- /dev/null
+++ b/test/monniaux/madd/madd.c
@@ -0,0 +1,11 @@
+unsigned madd(unsigned a, unsigned b, unsigned c) {
+ return a + b*c;
+}
+
+unsigned maddimm(unsigned a, unsigned b) {
+ return a + b*17113;
+}
+
+unsigned madd2(unsigned a, unsigned b, unsigned c) {
+ return c + b*a;
+}
diff --git a/test/monniaux/madd/madd_run.c b/test/monniaux/madd/madd_run.c
new file mode 100644
index 00000000..d4238c53
--- /dev/null
+++ b/test/monniaux/madd/madd_run.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+extern unsigned madd(unsigned a, unsigned b, unsigned c);
+
+int main() {
+ unsigned a = 7, b = 3, c = 4;
+ printf("res = %u\n", madd(a, b, c));
+ return 0;
+}