aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-08-30 15:08:07 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-08-30 15:08:07 +0200
commit436bf1192e129427f6fcc99d2e6b75db08e80cf8 (patch)
treee38476fa3ddf507797ec8363f433a4d9521bdb8a /test/mppa
parent96d03d469015db45828c89a68247f2c70c2bb102 (diff)
downloadcompcert-kvx-436bf1192e129427f6fcc99d2e6b75db08e80cf8.tar.gz
compcert-kvx-436bf1192e129427f6fcc99d2e6b75db08e80cf8.zip
(#157) Removed AFADDD and AFADDW from the builtins
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/instr/Makefile5
-rw-r--r--test/mppa/instr/builtin64.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/test/mppa/instr/Makefile b/test/mppa/instr/Makefile
index 33a265e3..69446796 100644
--- a/test/mppa/instr/Makefile
+++ b/test/mppa/instr/Makefile
@@ -46,6 +46,7 @@ all: $(BIN)
GREEN=\033[0;32m
RED=\033[0;31m
+YELLOW=\033[0;33m
NC=\033[0m
.PHONY:
@@ -54,7 +55,9 @@ test: $(X86_GCC_OUT) $(GCC_OUT)
for test in $(TESTNAMES); do\
x86out=$(OUTDIR)/$$test.x86-gcc.out;\
gccout=$(OUTDIR)/$$test.gcc.out;\
- if $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\
+ if grep "__K1C__" -q $$test.c; then\
+ printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __K1C__\`\n";\
+ elif $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\
>&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\
else\
printf "$(GREEN)GOOD: $$x86out and $$gccout concur$(NC)\n";\
diff --git a/test/mppa/instr/builtin64.c b/test/mppa/instr/builtin64.c
new file mode 100644
index 00000000..40d53dc7
--- /dev/null
+++ b/test/mppa/instr/builtin64.c
@@ -0,0 +1,10 @@
+#include "framework.h"
+
+BEGIN_TEST(long long)
+ long long *ptr = &c;
+#ifdef __K1C__
+ /* Removed the AFADDD builtin who was incorrect in CompCert, see #157 */
+ // a = __builtin_k1_afaddd(ptr, a);
+ // a = __builtin_k1_afaddd(ptr, a);
+#endif
+END_TEST64()