Skip to content

Commit

Permalink
more file renaming, use underscores more consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
oconnor663 committed Feb 12, 2020
1 parent 0281f1a commit fcc14c8
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ jobs:
# Test the assembly implementations.
- run: make test_asm
working-directory: ./c
- run: make clean && rm blake3_sse41-x86_64-unix.S
- 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
- 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
- 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
18 changes: 9 additions & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,24 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// "c_prefer_intrinsics" feature is enabled.
if is_windows_msvc() {
let mut build = new_build();
build.file("c/blake3_sse41-x86_64-windows-msvc.asm");
build.file("c/blake3_avx2-x86_64-windows-msvc.asm");
build.file("c/blake3_avx512-x86_64-windows-msvc.asm");
build.file("c/blake3_sse41_x86-64_windows_msvc.asm");
build.file("c/blake3_avx2_x86-64_windows_msvc.asm");
build.file("c/blake3_avx512_x86-64_windows_msvc.asm");
build.compile("blake3_asm");
} else if is_windows_gnu() {
let mut build = new_build();
build.file("c/blake3_sse41-x86_64-windows-gnu.S");
build.file("c/blake3_avx2-x86_64-windows-gnu.S");
build.file("c/blake3_avx512-x86_64-windows-gnu.S");
build.file("c/blake3_sse41_x86-64_windows_gnu.S");
build.file("c/blake3_avx2_x86-64_windows_gnu.S");
build.file("c/blake3_avx512_x86-64_windows_gnu.S");
build.compile("blake3_asm");
} else {
// All non-Windows implementations are assumed to support
// Linux-style assembly. These files do contain a small
// explicit workaround for macOS also.
let mut build = new_build();
build.file("c/blake3_sse41-x86_64-unix.S");
build.file("c/blake3_avx2-x86_64-unix.S");
build.file("c/blake3_avx512-x86_64-unix.S");
build.file("c/blake3_sse41_x86-64_unix.S");
build.file("c/blake3_avx2_x86-64_unix.S");
build.file("c/blake3_avx512_x86-64_unix.S");
build.compile("blake3_asm");
}
} else if is_x86_64() || is_x86_32() {
Expand Down
6 changes: 3 additions & 3 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ ifdef BLAKE3_NO_SSE41
EXTRAFLAGS += -DBLAKE3_NO_SSE41
else
TARGETS += blake3_sse41.o
ASM_TARGETS += blake3_sse41-x86_64-unix.S
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
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
ASM_TARGETS += blake3_avx512_x86-64_unix.S
endif

ifdef BLAKE3_USE_NEON
Expand Down
4 changes: 2 additions & 2 deletions c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ with a Unix-like OS, you can compile a working binary like this:

```bash
gcc -O3 -o example example.c blake3.c blake3_dispatch.c blake3_portable.c \
blake3_sse41-x86_64-unix.S blake3_avx2-x86_64-unix.S blake3_avx512-x86_64-unix.S
blake3_sse41_x86-64_unix.S blake3_avx2_x86-64_unix.S blake3_avx512_x86-64_unix.S
```

## Building
Expand Down Expand Up @@ -91,7 +91,7 @@ the assembly implementations:

```bash
gcc -shared -O3 -o libblake3.so blake3.c blake3_dispatch.c blake3_portable.c \
blake3_sse41-x86_64-unix.S blake3_avx2-x86_64-unix.S blake3_avx512-x86_64-unix.S
blake3_sse41_x86-64_unix.S blake3_avx2_x86-64_unix.S blake3_avx512_x86-64_unix.S
```

When building the intrinsics-based implementations, you need to build
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions c/blake3_c_rust_bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,24 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// "prefer_intrinsics" feature is enabled.
if is_windows_msvc() {
let mut build = new_build();
build.file("../blake3_sse41-x86_64-windows-msvc.asm");
build.file("../blake3_avx2-x86_64-windows-msvc.asm");
build.file("../blake3_avx512-x86_64-windows-msvc.asm");
build.file("../blake3_sse41_x86-64_windows_msvc.asm");
build.file("../blake3_avx2_x86-64_windows_msvc.asm");
build.file("../blake3_avx512_x86-64_windows_msvc.asm");
build.compile("blake3_asm");
} else if is_windows_gnu() {
let mut build = new_build();
build.file("../blake3_sse41-x86_64-windows-gnu.S");
build.file("../blake3_avx2-x86_64-windows-gnu.S");
build.file("../blake3_avx512-x86_64-windows-gnu.S");
build.file("../blake3_sse41_x86-64_windows_gnu.S");
build.file("../blake3_avx2_x86-64_windows_gnu.S");
build.file("../blake3_avx512_x86-64_windows_gnu.S");
build.compile("blake3_asm");
} else {
// All non-Windows implementations are assumed to support
// Linux-style assembly. These files do contain a small
// explicit workaround for macOS also.
let mut build = new_build();
build.file("../blake3_sse41-x86_64-unix.S");
build.file("../blake3_avx2-x86_64-unix.S");
build.file("../blake3_avx512-x86_64-unix.S");
build.file("../blake3_sse41_x86-64_unix.S");
build.file("../blake3_avx2_x86-64_unix.S");
build.file("../blake3_avx512_x86-64_unix.S");
build.compile("blake3_asm");
}
} else if is_x86_64() || is_x86_32() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fcc14c8

Please sign in to comment.