aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-08-30 12:09:23 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-08-30 12:09:23 +0200
commit96d03d469015db45828c89a68247f2c70c2bb102 (patch)
treea41285746ad036a2db7843ccf810d6589cbba8a3 /test/mppa
parent3a78733f68c8c02f8578fbfa8ca08bbed8ac7988 (diff)
downloadcompcert-kvx-96d03d469015db45828c89a68247f2c70c2bb102.tar.gz
compcert-kvx-96d03d469015db45828c89a68247f2c70c2bb102.zip
Adding tests for addx8d addx8w etc..
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/instr/Makefile5
-rw-r--r--test/mppa/instr/i32.c4
-rw-r--r--test/mppa/instr/i64.c4
3 files changed, 11 insertions, 2 deletions
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);