From 436bf1192e129427f6fcc99d2e6b75db08e80cf8 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 30 Aug 2019 15:08:07 +0200 Subject: (#157) Removed AFADDD and AFADDW from the builtins --- test/mppa/instr/Makefile | 5 ++++- test/mppa/instr/builtin64.c | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test/mppa/instr/builtin64.c (limited to 'test/mppa') 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() -- cgit