Branch Coverage

src/hexsimd.c
Criterion Covered Total %
branch 41 98 41.8


line true false branch
64 4 0 if (osxsave) {
67 4 0 if (os_avx && (r[2] & (1u<<28))) f.avx = 1;
4 0 if (os_avx && (r[2] & (1u<<28))) f.avx = 1;
70 4 0 if (f.avx) f.avx2 = (r[1] & (1u<<5)) != 0;
73 0 4 if (os_avx512) {
85 28 0 if (c >= '0' && c <= '9') { *out = (unsigned char)(c - '0'); return 1; }
20 8 if (c >= '0' && c <= '9') { *out = (unsigned char)(c - '0'); return 1; }
87 8 0 if (u >= 'A' && u <= 'F') { *out = (unsigned char)(10 + (u - 'A')); return 1; }
6 2 if (u >= 'A' && u <= 'F') { *out = (unsigned char)(10 + (u - 'A')); return 1; }
93 0 4 if (len & 1) return -1;
95 14 3 for (size_t i=0;i
99 14 0 if (strict && (!v1 || !v2)) return -1;
13 1 if (strict && (!v1 || !v2)) return -1;
0 13 if (strict && (!v1 || !v2)) return -1;
100 0 13 if (!v1) hi = 0;
101 0 13 if (!v2) lo = 0;
110 0 0 for (size_t i=0;i
152 0 0 if (want_valid && valid) *valid = _mm_or_si128(isd, isa);
0 0 if (want_valid && valid) *valid = _mm_or_si128(isd, isa);
166 0 0 if (len & 1) return -1;
168 0 0 for (; i+16<=len; i+=16, o+=8) {
172 0 0 if (strict) {
174 0 0 if ((unsigned)_mm_movemask_epi8(all) != 0xFFFFu) return -1;
179 0 0 if (i
181 0 0 if (t<0) return -1;
196 0 0 for (; i+16<=len; i+=16, o+=32) {
218 0 0 for (; i
221 0 0 dst[o+0] = (char)(h + 0x30 + (h>9 ? 0x07 : 0));
222 0 0 dst[o+1] = (char)(l + 0x30 + (l>9 ? 0x07 : 0));
240 0 5 if (len & 1) return -1;
253 32768 5 for (; i+32<=len; i+=32, o+=16) {
262 32768 0 if (strict) {
264 0 32768 if (!_mm256_testc_si256(valid, all_ff)) return -1;
278 4 1 if (i
280 1 3 if (t<0) return -1;
293 16384 5 for (; i + 32 <= len; i += 32, o += 64) {
336 16 5 for (; i < len; ++i, o += 2) {
339 1 15 dst[o+0] = (char)(h + 0x30 + (h > 9 ? 0x07 : 0));
340 8 8 dst[o+1] = (char)(l + 0x30 + (l > 9 ? 0x07 : 0));
525 10 4 if (g_hex2bin) return;
536 0 4 if (force && *force) {
0 0 if (force && *force) {
538 0 0 if (!strcasecmp(force, "scalar")) {
541 0 0 if (!strcasecmp(force, "sse2") && f.sse2) {
0 0 if (!strcasecmp(force, "sse2") && f.sse2) {
547 0 0 if (!strcasecmp(force, "avx2") && f.avx2) {
0 0 if (!strcasecmp(force, "avx2") && f.avx2) {
573 4 0 if (f.avx2) {
579 0 0 if (f.sse2) {