fuzz coverage

Coverage Report

Created: 2026-04-24 13:48

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/root/bitcoin/src/crypto/siphash.cpp
Line
Count
Source
1
// Copyright (c) 2016-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#include <crypto/siphash.h>
6
7
#include <uint256.h>
8
9
#include <bit>
10
#include <cassert>
11
#include <span>
12
13
19.3G
#define SIPROUND do { \
14
19.3G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
19.3G
    v0 = std::rotl(v0, 32); \
16
19.3G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
19.3G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
19.3G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
19.3G
    v2 = std::rotl(v2, 32); \
20
19.3G
} while (0)
21
22
2.06M
CSipHasher::CSipHasher(uint64_t k0, uint64_t k1) : m_state{k0, k1} {}
23
24
CSipHasher& CSipHasher::Write(uint64_t data)
25
2.06M
{
26
2.06M
    uint64_t v0 = m_state.v[0], v1 = m_state.v[1], v2 = m_state.v[2], v3 = m_state.v[3];
27
28
2.06M
    assert(m_count % 8 == 0);
29
30
2.06M
    v3 ^= data;
31
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
32
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
33
2.06M
    v0 ^= data;
34
35
2.06M
    m_state.v[0] = v0;
36
2.06M
    m_state.v[1] = v1;
37
2.06M
    m_state.v[2] = v2;
38
2.06M
    m_state.v[3] = v3;
39
40
2.06M
    m_count += 8;
41
2.06M
    return *this;
42
2.06M
}
43
44
CSipHasher& CSipHasher::Write(std::span<const unsigned char> data)
45
2.06M
{
46
2.06M
    uint64_t v0 = m_state.v[0], v1 = m_state.v[1], v2 = m_state.v[2], v3 = m_state.v[3];
47
2.06M
    uint64_t t = m_tmp;
48
2.06M
    uint8_t c = m_count;
49
50
68.0M
    while (data.size() > 0) {
51
66.0M
        t |= uint64_t{data.front()} << (8 * (c % 8));
52
66.0M
        c++;
53
66.0M
        if ((c & 7) == 0) {
54
8.25M
            v3 ^= t;
55
8.25M
            SIPROUND;
Line
Count
Source
13
8.25M
#define SIPROUND do { \
14
8.25M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
8.25M
    v0 = std::rotl(v0, 32); \
16
8.25M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
8.25M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
8.25M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
8.25M
    v2 = std::rotl(v2, 32); \
20
8.25M
} while (0)
56
8.25M
            SIPROUND;
Line
Count
Source
13
8.25M
#define SIPROUND do { \
14
8.25M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
8.25M
    v0 = std::rotl(v0, 32); \
16
8.25M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
8.25M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
8.25M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
8.25M
    v2 = std::rotl(v2, 32); \
20
8.25M
} while (0)
57
8.25M
            v0 ^= t;
58
8.25M
            t = 0;
59
8.25M
        }
60
66.0M
        data = data.subspan(1);
61
66.0M
    }
62
63
2.06M
    m_state.v[0] = v0;
64
2.06M
    m_state.v[1] = v1;
65
2.06M
    m_state.v[2] = v2;
66
2.06M
    m_state.v[3] = v3;
67
2.06M
    m_count = c;
68
2.06M
    m_tmp = t;
69
70
2.06M
    return *this;
71
2.06M
}
72
73
uint64_t CSipHasher::Finalize() const
74
2.06M
{
75
2.06M
    uint64_t v0 = m_state.v[0], v1 = m_state.v[1], v2 = m_state.v[2], v3 = m_state.v[3];
76
77
2.06M
    uint64_t t = m_tmp | (((uint64_t)m_count) << 56);
78
79
2.06M
    v3 ^= t;
80
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
81
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
82
2.06M
    v0 ^= t;
83
2.06M
    v2 ^= 0xFF;
84
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
85
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
86
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
87
2.06M
    SIPROUND;
Line
Count
Source
13
2.06M
#define SIPROUND do { \
14
2.06M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
2.06M
    v0 = std::rotl(v0, 32); \
16
2.06M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
2.06M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
2.06M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
2.06M
    v2 = std::rotl(v2, 32); \
20
2.06M
} while (0)
88
2.06M
    return v0 ^ v1 ^ v2 ^ v3;
89
2.06M
}
90
91
uint64_t PresaltedSipHasher::operator()(const uint256& val) const noexcept
92
234M
{
93
234M
    uint64_t v0 = m_state.v[0], v1 = m_state.v[1], v2 = m_state.v[2], v3 = m_state.v[3];
94
234M
    uint64_t d = val.GetUint64(0);
95
234M
    v3 ^= d;
96
97
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
98
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
99
234M
    v0 ^= d;
100
234M
    d = val.GetUint64(1);
101
234M
    v3 ^= d;
102
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
103
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
104
234M
    v0 ^= d;
105
234M
    d = val.GetUint64(2);
106
234M
    v3 ^= d;
107
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
108
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
109
234M
    v0 ^= d;
110
234M
    d = val.GetUint64(3);
111
234M
    v3 ^= d;
112
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
113
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
114
234M
    v0 ^= d;
115
234M
    v3 ^= (uint64_t{4}) << 59;
116
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
117
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
118
234M
    v0 ^= (uint64_t{4}) << 59;
119
234M
    v2 ^= 0xFF;
120
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
121
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
122
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
123
234M
    SIPROUND;
Line
Count
Source
13
234M
#define SIPROUND do { \
14
234M
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
234M
    v0 = std::rotl(v0, 32); \
16
234M
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
234M
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
234M
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
234M
    v2 = std::rotl(v2, 32); \
20
234M
} while (0)
124
234M
    return v0 ^ v1 ^ v2 ^ v3;
125
234M
}
126
127
/** Specialized implementation for efficiency */
128
uint64_t PresaltedSipHasher::operator()(const uint256& val, uint32_t extra) const noexcept
129
1.14G
{
130
1.14G
    uint64_t v0 = m_state.v[0], v1 = m_state.v[1], v2 = m_state.v[2], v3 = m_state.v[3];
131
1.14G
    uint64_t d = val.GetUint64(0);
132
1.14G
    v3 ^= d;
133
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
134
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
135
1.14G
    v0 ^= d;
136
1.14G
    d = val.GetUint64(1);
137
1.14G
    v3 ^= d;
138
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
139
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
140
1.14G
    v0 ^= d;
141
1.14G
    d = val.GetUint64(2);
142
1.14G
    v3 ^= d;
143
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
144
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
145
1.14G
    v0 ^= d;
146
1.14G
    d = val.GetUint64(3);
147
1.14G
    v3 ^= d;
148
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
149
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
150
1.14G
    v0 ^= d;
151
1.14G
    d = ((uint64_t{36}) << 56) | extra;
152
1.14G
    v3 ^= d;
153
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
154
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
155
1.14G
    v0 ^= d;
156
1.14G
    v2 ^= 0xFF;
157
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
158
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
159
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
160
1.14G
    SIPROUND;
Line
Count
Source
13
1.14G
#define SIPROUND do { \
14
1.14G
    v0 += v1; v1 = std::rotl(v1, 13); v1 ^= v0; \
15
1.14G
    v0 = std::rotl(v0, 32); \
16
1.14G
    v2 += v3; v3 = std::rotl(v3, 16); v3 ^= v2; \
17
1.14G
    v0 += v3; v3 = std::rotl(v3, 21); v3 ^= v0; \
18
1.14G
    v2 += v1; v1 = std::rotl(v1, 17); v1 ^= v2; \
19
1.14G
    v2 = std::rotl(v2, 32); \
20
1.14G
} while (0)
161
1.14G
    return v0 ^ v1 ^ v2 ^ v3;
162
1.14G
}