From 96d03d469015db45828c89a68247f2c70c2bb102 Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 30 Aug 2019 12:09:23 +0200 Subject: Adding tests for addx8d addx8w etc.. --- test/mppa/instr/Makefile | 5 +++-- test/mppa/instr/i32.c | 4 ++++ test/mppa/instr/i64.c | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'test/mppa') diff --git a/test/mppa/instr/Makefile b/test/mppa/instr/Makefile index 4129b628..33a265e3 100644 --- a/test/mppa/instr/Makefile +++ b/test/mppa/instr/Makefile @@ -5,6 +5,7 @@ CC ?= gcc CCOMP ?= ccomp OPTIM ?= -O2 CFLAGS ?= $(OPTIM) +CCOMPFLAGS ?= $(CFLAGS) -faddx SIMU ?= k1-mppa TIMEOUT ?= --signal=SIGTERM 120s DIFF ?= python2.7 floatcmp.py -reltol .00001 @@ -111,7 +112,7 @@ $(BINDIR)/%.gcc.bin: $(ASMDIR)/%.gcc.s $(K1LIB) $(K1CCPATH) $(BINDIR)/%.ccomp.bin: $(ASMDIR)/%.ccomp.s $(K1LIB) $(CCOMPPATH) @mkdir -p $(@D) - $(CCOMP) $(CFLAGS) $(filter-out $(CCOMPPATH),$^) -o $@ + $(CCOMP) $(CCOMPFLAGS) $(filter-out $(CCOMPPATH),$^) -o $@ # Source to assembly @@ -125,4 +126,4 @@ $(ASMDIR)/%.gcc.s: $(SRCDIR)/%.c $(K1CCPATH) $(ASMDIR)/%.ccomp.s: $(SRCDIR)/%.c $(CCOMPPATH) @mkdir -p $(@D) - $(CCOMP) $(CFLAGS) -S $< -o $@ + $(CCOMP) $(CCOMPFLAGS) -S $< -o $@ diff --git a/test/mppa/instr/i32.c b/test/mppa/instr/i32.c index c48531b1..c0985031 100644 --- a/test/mppa/instr/i32.c +++ b/test/mppa/instr/i32.c @@ -65,6 +65,10 @@ BEGIN_TEST(int) c += (a < b); c += (a + b) / 2; c += (int) int2float(a) + (int) int2float(b) + (int) int2float(42.3); + c += (a << 4); // addx16w + c += (a << 3); // addx8w + c += (a << 2); // addx4w + c += (a << 1); // addx2w int j; for (j = 0 ; j < 10 ; j++) diff --git a/test/mppa/instr/i64.c b/test/mppa/instr/i64.c index 00eb159d..84828bfb 100644 --- a/test/mppa/instr/i64.c +++ b/test/mppa/instr/i64.c @@ -43,6 +43,10 @@ BEGIN_TEST(long long) c += a >> (b & 0x8LL); c += a >> (b & 0x8ULL); c += a % b; + c += (a << 4); // addx16d + c += (a << 3); // addx8d + c += (a << 2); // addx4d + c += (a << 1); // addx2d long long d = 3; long long (*op)(long long, long long); -- cgit