diff options
| author | Jack O'Connor <[email protected]> | 2020-02-12 13:10:24 -0500 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2020-02-12 13:12:05 -0500 |
| commit | 1c4d7fdd8d45a397976963874269f22dcdde2a59 (patch) | |
| tree | 75d12d60898d1f6fec45bb0f196db8c587d2328c | |
| parent | 7ee05ba3bd029535ec4289ab187dbf1e7bda6274 (diff) | |
add test_asm to the C Makefileasm_integration2
| -rw-r--r-- | .github/workflows/ci.yml | 16 | ||||
| -rw-r--r-- | c/Makefile | 11 |
2 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 599da51..8d1fbaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,6 +100,7 @@ jobs: steps: - uses: actions/checkout@v1 + # Test the intrinsics-based implementations. - run: make test working-directory: ./c - run: make clean && rm blake3_sse41.c @@ -114,3 +115,18 @@ jobs: working-directory: ./c - run: BLAKE3_NO_SSE41=1 BLAKE3_NO_AVX2=1 BLAKE3_NO_AVX512=1 make test working-directory: ./c + # Test the assembly implementations. + - run: make test_asm + working-directory: ./c + - run: make clean && rm blake3-sse41-x86_64-unix.S + working-directory: ./c + - run: BLAKE3_NO_SSE41=1 make test_asm + working-directory: ./c + - run: make clean && rm blake3-avx2-x86_64-unix.S + working-directory: ./c + - run: BLAKE3_NO_SSE41=1 BLAKE3_NO_AVX2=1 make test_asm + working-directory: ./c + - run: make clean && rm blake3-avx512-x86_64-unix.S + working-directory: ./c + - run: BLAKE3_NO_SSE41=1 BLAKE3_NO_AVX2=1 BLAKE3_NO_AVX512=1 make test_asm + working-directory: ./c @@ -2,24 +2,28 @@ NAME=blake3 CC=gcc CFLAGS=-O3 -Wall -Wextra -std=c11 -pedantic TARGETS= +ASM_TARGETS= EXTRAFLAGS= ifdef BLAKE3_NO_SSE41 EXTRAFLAGS += -DBLAKE3_NO_SSE41 else TARGETS += blake3_sse41.o +ASM_TARGETS += blake3-sse41-x86_64-unix.S endif ifdef BLAKE3_NO_AVX2 EXTRAFLAGS += -DBLAKE3_NO_AVX2 else TARGETS += blake3_avx2.o +ASM_TARGETS += blake3-avx2-x86_64-unix.S endif ifdef BLAKE3_NO_AVX512 EXTRAFLAGS += -DBLAKE3_NO_AVX512 else TARGETS += blake3_avx512.o +ASM_TARGETS += blake3-avx512-x86_64-unix.S endif ifdef BLAKE3_USE_NEON @@ -46,5 +50,12 @@ test: CFLAGS += -DBLAKE3_TESTING -fsanitize=address,undefined test: all ./test.py +asm: blake3.c blake3_dispatch.c blake3_portable.c main.c $(ASM_TARGETS) + $(CC) $(CFLAGS) $(EXTRAFLAGS) $^ -o $(NAME) + +test_asm: CFLAGS += -DBLAKE3_TESTING -fsanitize=address,undefined +test_asm: asm + ./test.py + clean: rm -f $(NAME) *.o |
