UTF-8 validation in x86-64: a scalar reference and an AVX2 version that checks 32 bytes per step. Every build fuzzes one against the other.
1# Verified builds for utf8-check.
3[project]
4isa = "x86-64"
5assembler = "nasm"
6target = "Windows x64 objects, AVX2"
8[[step]]
9name = "assemble the scalar reference"
10run = ["nasm", "-f", "win64", "-o", "build/utf8_scalar.obj", "src/utf8_scalar.asm"]
12[[step]]
13name = "assemble AVX2"
14run = ["nasm", "-f", "win64", "-o", "build/utf8_avx2.obj", "src/utf8_avx2.asm"]
16[[step]]
17name = "build the tests"
18run = ["gcc", "-O2", "-Wall", "-o", "build/test.exe", "test/test.c", "build/utf8_scalar.obj", "build/utf8_avx2.obj"]
20[[step]]
21name = "table 3-7"
22on = "windows"
23run = ["./build/test.exe"]
24expect = "0 wrong"
26[[step]]
27name = "build the benchmark"
28run = ["gcc", "-O2", "-Wall", "-o", "build/bench.exe", "bench/bench.c", "build/utf8_scalar.obj", "build/utf8_avx2.obj"]
30[[step]]
31name = "time both on 64 MiB"
32on = "windows"
33run = ["./build/bench.exe"]
34expect = "MiB of mixed text"
36[artifact]
37path = "build/utf8_avx2.obj"
38paths = ["build/utf8_scalar.obj"]