diff options
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | test/Makefile | 6 | ||||
-rw-r--r-- | test/regression/Makefile | 7 | ||||
-rw-r--r-- | test/regression/extasm.c | 1 | ||||
-rw-r--r-- | test/regression/packedstruct1.c | 38 |
5 files changed, 32 insertions, 21 deletions
@@ -847,6 +847,7 @@ cat >> Makefile.config <<EOF ARCHDIRS=$arch $arch/lib $arch/abstractbb $arch/abstractbb/Impure EXECUTE=k1-cluster --syscall=libstd_scalls.so -- CFLAGS= -D __K1C_COS__ +SIMU=k1-cluster -- BACKENDLIB=Machblock.v Machblockgen.v Machblockgenproof.v\\ Asmblock.v Asmblockgen.v Asmblockgenproof0.v Asmblockgenproof1.v Asmblockgenproof.v Asmvliw.v\\ ForwardSimulationBlock.v PostpassScheduling.v PostpassSchedulingproof.v\\ diff --git a/test/Makefile b/test/Makefile index 037fdc8f..7efcd8f1 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,8 +1,12 @@ include ../Makefile.config #DIRS=c compression raytracer spass regression + # Kalray note - removing compression, raytracer and spass that cannot be executed by the simulator in reasonable time -DIRS=c regression +ifeq ($(ARCH),mppa_k1c) + DIRS:=c regression +endif + ifeq ($(CLIGHTGEN),true) DIRS+=clightgen endif diff --git a/test/regression/Makefile b/test/regression/Makefile index f3bf64bb..aeabc7e1 100644 --- a/test/regression/Makefile +++ b/test/regression/Makefile @@ -20,12 +20,17 @@ TESTS=int32 int64 floats floats-basics floats-lit \ # Can run, but only in compiled mode, and have reference output in Results -TESTS_COMP=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \ +TESTS_COMP?=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \ bitfields5 bitfields6 bitfields7 bitfields8 \ builtins-$(ARCH) alignas \ varargs1 varargs2 varargs3 sections alias aligned\ packedstruct1 packedstruct2 +# varargs2 ---> bug in k1-cos-gcc +ifeq ($(ARCH),mppa_k1c) + TESTS_COMP:=$(filter-out varargs2,$(TESTS_COMP)) +endif + # Can run, both in compiled mode and in interpreter mode, # but produce processor-dependent results, so no reference output in Results diff --git a/test/regression/extasm.c b/test/regression/extasm.c index 297178d1..8abeb98f 100644 --- a/test/regression/extasm.c +++ b/test/regression/extasm.c @@ -24,6 +24,7 @@ int clobbers(int x, int z) || (defined(ARCH_riscV) && defined(MODEL_64)) \ || (defined(ARCH_powerpc) && defined(MODEL_ppc64)) \ || (defined(ARCH_powerpc) && defined(MODEL_e5500)) \ + || (defined(ARCH_mppa_k1c) && defined(MODEL_64)) || defined(ARCH_aarch64) #define SIXTYFOUR #else diff --git a/test/regression/packedstruct1.c b/test/regression/packedstruct1.c index 5d3e7124..ac68c698 100644 --- a/test/regression/packedstruct1.c +++ b/test/regression/packedstruct1.c @@ -2,8 +2,8 @@ #include <stdio.h> -/* offsetof is the offset computed by the verified front-end (cfrontend/) */ -#define offsetof(s,f) (int)&(((struct s *)0)->f) +/* offsetOf is the offset computed by the verified front-end (cfrontend/) */ +#define offsetOf(s,f) (int)&(((struct s *)0)->f) /* boffsetof is the offset computed by the elaborator (cparser/) */ #define boffsetof(s,f) (int)__builtin_offsetof(struct s, f) @@ -23,9 +23,9 @@ void test1(void) struct s1 s1; printf("sizeof(struct s1) = %d\n", szof(s1)); printf("precomputed sizeof(struct s1) = %d\n", bszof(s1)); - printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", - offsetof(s1,x), offsetof(s1,y), offsetof(s1,z)); - printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", + printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", + offsetOf(s1,x), offsetOf(s1,y), offsetOf(s1,z)); + printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", boffsetof(s1,x), boffsetof(s1,y), boffsetof(s1,z)); s1.x = 123; s1.y = -456; s1.z = 3.14159; printf("s1 = {x = %d, y = %d, z = %.5f}\n\n", s1.x, s1.y, s1.z); @@ -44,9 +44,9 @@ void test2(void) printf("sizeof(struct s2) = %d\n", szof(s2)); printf("precomputed sizeof(struct s2) = %d\n", bszof(s2)); printf("&s2 mod 16 = %d\n", ((int) &s2) & 0xF); - printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", - offsetof(s2,x), offsetof(s2,y), offsetof(s2,z)); - printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", + printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", + offsetOf(s2,x), offsetOf(s2,y), offsetOf(s2,z)); + printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", boffsetof(s2,x), boffsetof(s2,y), boffsetof(s2,z)); s2.x = 12345; s2.y = -456; s2.z = 3.14159; printf("s2 = {x = %d, y = %d, z = %.5f}\n\n", s2.x, s2.y, s2.z); @@ -73,8 +73,8 @@ void test3(void) printf("sizeof(struct s3) = %d\n", szof(s3)); printf("precomputed sizeof(struct s3) = %d\n", bszof(s3)); - printf("offsetof(s) = %d\n", offsetof(s3,s)); - printf("precomputed offsetof(s) = %d\n", boffsetof(s3,s)); + printf("offsetOf(s) = %d\n", offsetOf(s3,s)); + printf("precomputed offsetOf(s) = %d\n", boffsetof(s3,s)); s3.x = 123; s3.y = 45678; s3.z = 0x80000001U; @@ -103,9 +103,9 @@ void test4(void) printf("sizeof(struct s4) = %d\n", szof(s4)); printf("precomputed sizeof(struct s4) = %d\n", bszof(s4)); - printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", - offsetof(s4,x), offsetof(s4,y), offsetof(s4,z)); - printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", + printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", + offsetOf(s4,x), offsetOf(s4,y), offsetOf(s4,z)); + printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", boffsetof(s4,x), boffsetof(s4,y), boffsetof(s4,z)); s4.x = 123; s4.y = -456; s4.z = 3.14159; printf("s4 = {x = %d, y = %d, z = %.5f}\n\n", s4.x, s4.y, s4.z); @@ -121,9 +121,9 @@ void test5(void) printf("sizeof(struct s5) = %d\n", szof(s5)); printf("precomputed sizeof(struct s5) = %d\n", bszof(s5)); - printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", - offsetof(s5,x), offsetof(s5,y), offsetof(s5,z)); - printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", + printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", + offsetOf(s5,x), offsetOf(s5,y), offsetOf(s5,z)); + printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", boffsetof(s5,x), boffsetof(s5,y), boffsetof(s5,z)); s5.x = 123; s5.y = -456; s5.z = 3.14159; printf("s5 = {x = %d, y = %d, z = %.5f}\n\n", s5.x, s5.y, s5.z); @@ -139,9 +139,9 @@ void test6(void) printf("sizeof(struct s6) = %d\n", szof(s6)); printf("precomputed sizeof(struct s6) = %d\n", bszof(s6)); - printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", - offsetof(s6,x), offsetof(s6,y), offsetof(s6,z)); - printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n", + printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", + offsetOf(s6,x), offsetOf(s6,y), offsetOf(s6,z)); + printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n", boffsetof(s6,x), boffsetof(s6,y), boffsetof(s6,z)); s62.x = 123; s62.y = -456; s62.z = 3.14159; printf("s62 = {x = %d, y = %d, z = %.5f}\n\n", s62.x, s62.y, s62.z); |