aboutsummaryrefslogtreecommitdiff
path: root/c/Makefile.testing
diff options
context:
space:
mode:
authorMatthew Krupcale <[email protected]>2020-08-14 18:02:06 -0400
committerMatthew Krupcale <[email protected]>2020-08-24 00:54:46 -0400
commitd91f20dd29e491b70d0fb900ff3445f53add50a3 (patch)
tree02ddbc3bd3281617bcb282be0b825b01df5427f7 /c/Makefile.testing
parentadbf07d67a1f08c40e1c7ff60845519f81e0254f (diff)
Start SSE2 implementation based on SSE4.1 version
Wire up basic functions and features for SSE2 support using the SSE4.1 version as a basis without implementing the SSE2 instructions yet. * Cargo.toml: add no_sse2 feature * benches/bench.rs: wire SSE2 benchmarks * build.rs: add SSE2 rust intrinsics and assembly builds * c/Makefile.testing: add SSE2 C and assembly targets * c/README.md: add SSE2 to C build instructions * c/blake3_c_rust_bindings/build.rs: add SSE2 C rust binding builds * c/blake3_c_rust_bindings/src/lib.rs: add SSE2 C rust bindings * c/blake3_dispatch.c: add SSE2 C dispatch * c/blake3_impl.h: add SSE2 C function prototypes * c/blake3_sse2.c: add SSE2 C intrinsic file starting with SSE4.1 version * c/blake3_sse2_x86-64_{unix.S,windows_gnu.S,windows_msvc.asm}: add SSE2 assembly files starting with SSE4.1 version * src/ffi_sse2.rs: add rust implementation using SSE2 C rust bindings * src/lib.rs: add SSE2 rust intrinsics and SSE2 C rust binding rust SSE2 module configurations * src/platform.rs: add SSE2 rust platform detection and dispatch * src/rust_sse2.rs: add SSE2 rust intrinsic file starting with SSE4.1 version * tools/instruction_set_support/src/main.rs: add SSE2 feature detection
Diffstat (limited to 'c/Makefile.testing')
-rw-r--r--c/Makefile.testing10
1 files changed, 10 insertions, 0 deletions
diff --git a/c/Makefile.testing b/c/Makefile.testing
index bbdc077..b4db5c8 100644
--- a/c/Makefile.testing
+++ b/c/Makefile.testing
@@ -9,6 +9,13 @@ TARGETS=
ASM_TARGETS=
EXTRAFLAGS=-Wa,--noexecstack
+ifdef BLAKE3_NO_SSE2
+EXTRAFLAGS += -DBLAKE3_NO_SSE2
+else
+TARGETS += blake3_sse2.o
+ASM_TARGETS += blake3_sse2_x86-64_unix.S
+endif
+
ifdef BLAKE3_NO_SSE41
EXTRAFLAGS += -DBLAKE3_NO_SSE41
else
@@ -38,6 +45,9 @@ endif
all: blake3.c blake3_dispatch.c blake3_portable.c main.c $(TARGETS)
$(CC) $(CFLAGS) $(EXTRAFLAGS) $^ -o $(NAME) $(LDFLAGS)
+blake3_sse2.o: blake3_sse2.c
+ $(CC) $(CFLAGS) $(EXTRAFLAGS) -c $^ -o $@ -msse2
+
blake3_sse41.o: blake3_sse41.c
$(CC) $(CFLAGS) $(EXTRAFLAGS) -c $^ -o $@ -msse4.1