From b4a08d0815342b6238d307864f0823d0f07bb691 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Tue, 26 May 2020 22:04:20 +0200 Subject: k1c -> kvx changes --- test/mppa/instr/Makefile | 20 ++++++++++---------- test/mppa/instr/builtin32.c | 4 ++-- test/mppa/instr/builtin64.c | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'test/mppa/instr') diff --git a/test/mppa/instr/Makefile b/test/mppa/instr/Makefile index 37f7d0ab..e4f964b3 100644 --- a/test/mppa/instr/Makefile +++ b/test/mppa/instr/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash -K1CC ?= k1-cos-gcc +KVXC ?= k1-cos-gcc CC ?= gcc CCOMP ?= ccomp OPTIM ?= -O2 @@ -24,7 +24,7 @@ K1LIB=../lib/system.gcc.a # -> .ccomp.s -> .ccomp.bin -> .ccomp.out ## -K1CCPATH=$(shell which $(K1CC)) +KVXCPATH=$(shell which $(KVXC)) CCPATH=$(shell which $(CC)) CCOMPPATH=$(shell which $(CCOMP)) SIMUPATH=$(shell which $(SIMU)) @@ -63,8 +63,8 @@ simutest: $(X86_GCC_OUT) $(GCC_SIMUOUT) for test in $(TESTNAMES); do\ x86out=$(OUTDIR)/$$test.x86-gcc.out;\ gccout=$(OUTDIR)/$$test.gcc.simu.out;\ - if grep "__K1C__" -q $$test.c; then\ - printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __K1C__\`\n";\ + if grep "__KVX__" -q $$test.c; then\ + printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __KVX__\`\n";\ elif $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ >&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\ else\ @@ -91,8 +91,8 @@ hardtest: $(X86_GCC_OUT) $(GCC_HARDOUT) for test in $(TESTNAMES); do\ x86out=$(OUTDIR)/$$test.x86-gcc.out;\ gccout=$(OUTDIR)/$$test.gcc.hard.out;\ - if grep "__K1C__" -q $$test.c; then\ - printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __K1C__\`\n";\ + if grep "__KVX__" -q $$test.c; then\ + printf "$(YELLOW)UNTESTED: $$test.c contains an \`#ifdef __KVX__\`\n";\ elif $(DIFF) $$x86out $$gccout > /dev/null; test $${PIPESTATUS[0]} -ne 0; then\ >&2 printf "$(RED)ERROR: $$x86out and $$gccout differ$(NC)\n";\ else\ @@ -153,9 +153,9 @@ $(BINDIR)/%.x86-gcc.bin: $(ASMDIR)/%.x86-gcc.s $(LIB) $(CCPATH) @mkdir -p $(@D) $(CC) $(CFLAGS) $(filter-out $(CCPATH),$^) -o $@ -$(BINDIR)/%.gcc.bin: $(ASMDIR)/%.gcc.s $(K1LIB) $(K1CCPATH) +$(BINDIR)/%.gcc.bin: $(ASMDIR)/%.gcc.s $(K1LIB) $(KVXCPATH) @mkdir -p $(@D) - $(K1CC) $(CFLAGS) $(filter-out $(K1CCPATH),$^) -o $@ + $(KVXC) $(CFLAGS) $(filter-out $(KVXCPATH),$^) -o $@ $(BINDIR)/%.ccomp.bin: $(ASMDIR)/%.ccomp.s $(K1LIB) $(CCOMPPATH) @mkdir -p $(@D) @@ -167,9 +167,9 @@ $(ASMDIR)/%.x86-gcc.s: $(SRCDIR)/%.c $(CCPATH) @mkdir -p $(@D) $(CC) $(CFLAGS) -S $< -o $@ -$(ASMDIR)/%.gcc.s: $(SRCDIR)/%.c $(K1CCPATH) +$(ASMDIR)/%.gcc.s: $(SRCDIR)/%.c $(KVXCPATH) @mkdir -p $(@D) - $(K1CC) $(CFLAGS) -S $< -o $@ + $(KVXC) $(CFLAGS) -S $< -o $@ $(ASMDIR)/%.ccomp.s: $(SRCDIR)/%.c $(CCOMPPATH) @mkdir -p $(@D) diff --git a/test/mppa/instr/builtin32.c b/test/mppa/instr/builtin32.c index c7689dc8..9efb33cd 100644 --- a/test/mppa/instr/builtin32.c +++ b/test/mppa/instr/builtin32.c @@ -2,9 +2,9 @@ BEGIN_TEST(int) int *ptr = &c; -#ifdef __K1C__ +#ifdef __KVX__ int d = c; - a = __builtin_k1_alclrw(ptr); + a = __builtin_kvx_alclrw(ptr); c = d; #endif diff --git a/test/mppa/instr/builtin64.c b/test/mppa/instr/builtin64.c index dbbb1886..252eb2c6 100644 --- a/test/mppa/instr/builtin64.c +++ b/test/mppa/instr/builtin64.c @@ -2,16 +2,16 @@ BEGIN_TEST(long long) long long *ptr = &c; -#ifdef __K1C__ +#ifdef __KVX__ long long d = c; - a = __builtin_k1_alclrd(ptr); + a = __builtin_kvx_alclrd(ptr); c = d; c += a; c += __builtin_clzll(a); /* Removed the AFADDD builtin who was incorrect in CompCert, see #157 */ - // a = __builtin_k1_afaddd(ptr, a); - // a = __builtin_k1_afaddd(ptr, a); + // a = __builtin_kvx_afaddd(ptr, a); + // a = __builtin_kvx_afaddd(ptr, a); #endif END_TEST64() -- cgit