aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/madd/madd.c
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-20 09:49:45 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-20 09:49:45 +0100
commita0c25ff1259a8373fb71e780f70d28916c321612 (patch)
tree043fdf2bf1c56844d37603b13f7684858edf2155 /test/monniaux/madd/madd.c
parent5487cf64164eeea716e3ad140977aa73ccbe00ce (diff)
downloadcompcert-kvx-a0c25ff1259a8373fb71e780f70d28916c321612.tar.gz
compcert-kvx-a0c25ff1259a8373fb71e780f70d28916c321612.zip
maddl / maddlim are synthesized (but not for pointers it seems)
Diffstat (limited to 'test/monniaux/madd/madd.c')
-rw-r--r--test/monniaux/madd/madd.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/monniaux/madd/madd.c b/test/monniaux/madd/madd.c
index f847edf3..68f348ad 100644
--- a/test/monniaux/madd/madd.c
+++ b/test/monniaux/madd/madd.c
@@ -1,11 +1,25 @@
-unsigned madd(unsigned a, unsigned b, unsigned c) {
+#include <stdint.h>
+
+uint32_t madd(uint32_t a, uint32_t b, uint32_t c) {
+ return a + b*c;
+}
+
+uint32_t maddimm(uint32_t a, uint32_t b) {
+ return a + b*17113;
+}
+
+uint32_t madd2(uint32_t a, uint32_t b, uint32_t c) {
+ return c + b*a;
+}
+
+uint64_t maddl(uint64_t a, uint64_t b, uint64_t c) {
return a + b*c;
}
-unsigned maddimm(unsigned a, unsigned b) {
+uint64_t maddlimm(uint64_t a, uint64_t b) {
return a + b*17113;
}
-unsigned madd2(unsigned a, unsigned b, unsigned c) {
+uint64_t maddl2(uint64_t a, uint64_t b, uint64_t c) {
return c + b*a;
}