Coverage Report

Created: 2024-11-21 07:03

/src/libgcrypt/cipher/bithelp.h
Line
Count
Source (jump to first uncovered line)
1
/* bithelp.h  -  Some bit manipulation helpers
2
 *  Copyright (C) 1999, 2002 Free Software Foundation, Inc.
3
 *
4
 * This file is part of Libgcrypt.
5
 *
6
 * Libgcrypt is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU Lesser General Public License as
8
 * published by the Free Software Foundation; either version 2.1 of
9
 * the License, or (at your option) any later version.
10
 *
11
 * Libgcrypt is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
18
 */
19
#ifndef GCRYPT_BITHELP_H
20
#define GCRYPT_BITHELP_H
21
22
#include "types.h"
23
24
25
/****************
26
 * Rotate the 32 bit unsigned integer X by N bits left/right
27
 */
28
static inline u32 rol(u32 x, int n)
29
275M
{
30
275M
  return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
31
275M
}
md4.c:rol
Line
Count
Source
29
24.2M
{
30
24.2M
  return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
31
24.2M
}
md5.c:rol
Line
Count
Source
29
22.5M
{
30
22.5M
  return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
31
22.5M
}
Unexecuted instantiation: mpicoder.c:rol
rmd160.c:rol
Line
Count
Source
29
227M
{
30
227M
  return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
31
227M
}
Unexecuted instantiation: rndjent.c:rol
Unexecuted instantiation: sha1.c:rol
Unexecuted instantiation: sha256.c:rol
Unexecuted instantiation: sha512.c:rol
Unexecuted instantiation: sm3.c:rol
Unexecuted instantiation: stribog.c:rol
Unexecuted instantiation: tiger.c:rol
Unexecuted instantiation: whirlpool.c:rol
Unexecuted instantiation: blake2.c:rol
Unexecuted instantiation: cipher.c:rol
Unexecuted instantiation: crc.c:rol
Unexecuted instantiation: des.c:rol
Unexecuted instantiation: gost28147.c:rol
Unexecuted instantiation: gostr3411-94.c:rol
Unexecuted instantiation: hash-common.c:rol
Unexecuted instantiation: idea.c:rol
Unexecuted instantiation: kdf.c:rol
Unexecuted instantiation: keccak.c:rol
Unexecuted instantiation: mac-hmac.c:rol
Unexecuted instantiation: mac-poly1305.c:rol
Unexecuted instantiation: poly1305.c:rol
Unexecuted instantiation: random-drbg.c:rol
Unexecuted instantiation: rfc2268.c:rol
Unexecuted instantiation: rijndael.c:rol
Unexecuted instantiation: salsa20.c:rol
Unexecuted instantiation: scrypt.c:rol
Unexecuted instantiation: seed.c:rol
serpent.c:rol
Line
Count
Source
29
1.31M
{
30
1.31M
  return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
31
1.31M
}
sm4.c:rol
Line
Count
Source
29
195k
{
30
195k
  return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
31
195k
}
Unexecuted instantiation: twofish.c:rol
Unexecuted instantiation: arcfour.c:rol
Unexecuted instantiation: aria.c:rol
Unexecuted instantiation: blowfish.c:rol
Unexecuted instantiation: camellia-glue.c:rol
Unexecuted instantiation: camellia.c:rol
Unexecuted instantiation: cast5.c:rol
Unexecuted instantiation: chacha20.c:rol
Unexecuted instantiation: cipher-aeswrap.c:rol
Unexecuted instantiation: cipher-cbc.c:rol
Unexecuted instantiation: cipher-ccm.c:rol
Unexecuted instantiation: cipher-cfb.c:rol
Unexecuted instantiation: cipher-cmac.c:rol
Unexecuted instantiation: cipher-ctr.c:rol
Unexecuted instantiation: cipher-eax.c:rol
Unexecuted instantiation: cipher-gcm-siv.c:rol
Unexecuted instantiation: cipher-gcm.c:rol
Unexecuted instantiation: cipher-ocb.c:rol
Unexecuted instantiation: cipher-ofb.c:rol
Unexecuted instantiation: cipher-poly1305.c:rol
Unexecuted instantiation: cipher-siv.c:rol
Unexecuted instantiation: cipher-xts.c:rol
Unexecuted instantiation: ec-nist.c:rol
Unexecuted instantiation: ecc-sm2.c:rol
Unexecuted instantiation: rijndael-padlock.c:rol
Unexecuted instantiation: rijndael-vaes.c:rol
32
33
static inline u32 ror(u32 x, int n)
34
85.6k
{
35
85.6k
  return ( (x >> (n&(32-1))) | (x << ((32-n)&(32-1))) );
36
85.6k
}
Unexecuted instantiation: md4.c:ror
Unexecuted instantiation: md5.c:ror
Unexecuted instantiation: mpicoder.c:ror
Unexecuted instantiation: rmd160.c:ror
Unexecuted instantiation: rndjent.c:ror
Unexecuted instantiation: sha1.c:ror
Unexecuted instantiation: sha256.c:ror
Unexecuted instantiation: sha512.c:ror
Unexecuted instantiation: sm3.c:ror
Unexecuted instantiation: stribog.c:ror
Unexecuted instantiation: tiger.c:ror
Unexecuted instantiation: whirlpool.c:ror
Unexecuted instantiation: blake2.c:ror
Unexecuted instantiation: cipher.c:ror
Unexecuted instantiation: crc.c:ror
Unexecuted instantiation: des.c:ror
Unexecuted instantiation: gost28147.c:ror
Unexecuted instantiation: gostr3411-94.c:ror
Unexecuted instantiation: hash-common.c:ror
Unexecuted instantiation: idea.c:ror
Unexecuted instantiation: kdf.c:ror
Unexecuted instantiation: keccak.c:ror
Unexecuted instantiation: mac-hmac.c:ror
Unexecuted instantiation: mac-poly1305.c:ror
Unexecuted instantiation: poly1305.c:ror
Unexecuted instantiation: random-drbg.c:ror
Unexecuted instantiation: rfc2268.c:ror
Unexecuted instantiation: rijndael.c:ror
Unexecuted instantiation: salsa20.c:ror
Unexecuted instantiation: scrypt.c:ror
Unexecuted instantiation: seed.c:ror
serpent.c:ror
Line
Count
Source
34
3.72k
{
35
3.72k
  return ( (x >> (n&(32-1))) | (x << ((32-n)&(32-1))) );
36
3.72k
}
Unexecuted instantiation: sm4.c:ror
Unexecuted instantiation: twofish.c:ror
Unexecuted instantiation: arcfour.c:ror
aria.c:ror
Line
Count
Source
34
81.8k
{
35
81.8k
  return ( (x >> (n&(32-1))) | (x << ((32-n)&(32-1))) );
36
81.8k
}
Unexecuted instantiation: blowfish.c:ror
Unexecuted instantiation: camellia-glue.c:ror
Unexecuted instantiation: camellia.c:ror
Unexecuted instantiation: cast5.c:ror
Unexecuted instantiation: chacha20.c:ror
Unexecuted instantiation: cipher-aeswrap.c:ror
Unexecuted instantiation: cipher-cbc.c:ror
Unexecuted instantiation: cipher-ccm.c:ror
Unexecuted instantiation: cipher-cfb.c:ror
Unexecuted instantiation: cipher-cmac.c:ror
Unexecuted instantiation: cipher-ctr.c:ror
Unexecuted instantiation: cipher-eax.c:ror
Unexecuted instantiation: cipher-gcm-siv.c:ror
Unexecuted instantiation: cipher-gcm.c:ror
Unexecuted instantiation: cipher-ocb.c:ror
Unexecuted instantiation: cipher-ofb.c:ror
Unexecuted instantiation: cipher-poly1305.c:ror
Unexecuted instantiation: cipher-siv.c:ror
Unexecuted instantiation: cipher-xts.c:ror
Unexecuted instantiation: ec-nist.c:ror
Unexecuted instantiation: ecc-sm2.c:ror
Unexecuted instantiation: rijndael-padlock.c:ror
Unexecuted instantiation: rijndael-vaes.c:ror
37
38
static inline u64 rol64(u64 x, int n)
39
0
{
40
0
  return ( (x << (n&(64-1))) | (x >> ((64-n)&(64-1))) );
41
0
}
Unexecuted instantiation: md4.c:rol64
Unexecuted instantiation: md5.c:rol64
Unexecuted instantiation: mpicoder.c:rol64
Unexecuted instantiation: rmd160.c:rol64
Unexecuted instantiation: rndjent.c:rol64
Unexecuted instantiation: sha1.c:rol64
Unexecuted instantiation: sha256.c:rol64
Unexecuted instantiation: sha512.c:rol64
Unexecuted instantiation: sm3.c:rol64
Unexecuted instantiation: stribog.c:rol64
Unexecuted instantiation: tiger.c:rol64
Unexecuted instantiation: whirlpool.c:rol64
Unexecuted instantiation: blake2.c:rol64
Unexecuted instantiation: cipher.c:rol64
Unexecuted instantiation: crc.c:rol64
Unexecuted instantiation: des.c:rol64
Unexecuted instantiation: gost28147.c:rol64
Unexecuted instantiation: gostr3411-94.c:rol64
Unexecuted instantiation: hash-common.c:rol64
Unexecuted instantiation: idea.c:rol64
Unexecuted instantiation: kdf.c:rol64
Unexecuted instantiation: mac-hmac.c:rol64
Unexecuted instantiation: mac-poly1305.c:rol64
Unexecuted instantiation: poly1305.c:rol64
Unexecuted instantiation: random-drbg.c:rol64
Unexecuted instantiation: rfc2268.c:rol64
Unexecuted instantiation: rijndael.c:rol64
Unexecuted instantiation: salsa20.c:rol64
Unexecuted instantiation: scrypt.c:rol64
Unexecuted instantiation: seed.c:rol64
Unexecuted instantiation: serpent.c:rol64
Unexecuted instantiation: sm4.c:rol64
Unexecuted instantiation: twofish.c:rol64
Unexecuted instantiation: arcfour.c:rol64
Unexecuted instantiation: aria.c:rol64
Unexecuted instantiation: blowfish.c:rol64
Unexecuted instantiation: camellia-glue.c:rol64
Unexecuted instantiation: camellia.c:rol64
Unexecuted instantiation: cast5.c:rol64
Unexecuted instantiation: chacha20.c:rol64
Unexecuted instantiation: cipher-aeswrap.c:rol64
Unexecuted instantiation: cipher-cbc.c:rol64
Unexecuted instantiation: cipher-ccm.c:rol64
Unexecuted instantiation: cipher-cfb.c:rol64
Unexecuted instantiation: cipher-cmac.c:rol64
Unexecuted instantiation: cipher-ctr.c:rol64
Unexecuted instantiation: cipher-eax.c:rol64
Unexecuted instantiation: cipher-gcm-siv.c:rol64
Unexecuted instantiation: cipher-gcm.c:rol64
Unexecuted instantiation: cipher-ocb.c:rol64
Unexecuted instantiation: cipher-ofb.c:rol64
Unexecuted instantiation: cipher-poly1305.c:rol64
Unexecuted instantiation: cipher-siv.c:rol64
Unexecuted instantiation: cipher-xts.c:rol64
Unexecuted instantiation: ec-nist.c:rol64
Unexecuted instantiation: ecc-sm2.c:rol64
Unexecuted instantiation: rijndael-padlock.c:rol64
Unexecuted instantiation: rijndael-vaes.c:rol64
42
43
/* Byte swap for 32-bit and 64-bit integers.  If available, use compiler
44
   provided helpers.  */
45
#ifdef HAVE_BUILTIN_BSWAP32
46
2.18M
# define _gcry_bswap32 __builtin_bswap32
47
#else
48
static inline u32
49
_gcry_bswap32(u32 x)
50
{
51
  return ((rol(x, 8) & 0x00ff00ffL) | (ror(x, 8) & 0xff00ff00L));
52
}
53
#endif
54
55
#ifdef HAVE_BUILTIN_BSWAP64
56
857k
# define _gcry_bswap64 __builtin_bswap64
57
#else
58
static inline u64
59
_gcry_bswap64(u64 x)
60
{
61
  return ((u64)_gcry_bswap32(x) << 32) | (_gcry_bswap32(x >> 32));
62
}
63
#endif
64
65
/* Endian dependent byte swap operations.  */
66
#ifdef WORDS_BIGENDIAN
67
# define le_bswap32(x) _gcry_bswap32(x)
68
# define be_bswap32(x) ((u32)(x))
69
# define le_bswap64(x) _gcry_bswap64(x)
70
# define be_bswap64(x) ((u64)(x))
71
#else
72
35.7M
# define le_bswap32(x) ((u32)(x))
73
2.10M
# define be_bswap32(x) _gcry_bswap32(x)
74
134M
# define le_bswap64(x) ((u64)(x))
75
857k
# define be_bswap64(x) _gcry_bswap64(x)
76
#endif
77
78
79
/* Count trailing zero bits in an unsigend int.  We return an int
80
   because that is what gcc's builtin does.  Returns the number of
81
   bits in X if X is 0. */
82
static inline int
83
_gcry_ctz (unsigned int x)
84
22.3k
{
85
22.3k
#if defined (HAVE_BUILTIN_CTZ)
86
22.3k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
22.3k
}
md4.c:_gcry_ctz
Line
Count
Source
84
1.07k
{
85
1.07k
#if defined (HAVE_BUILTIN_CTZ)
86
1.07k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
1.07k
}
md5.c:_gcry_ctz
Line
Count
Source
84
1.46k
{
85
1.46k
#if defined (HAVE_BUILTIN_CTZ)
86
1.46k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
1.46k
}
Unexecuted instantiation: mpicoder.c:_gcry_ctz
rmd160.c:_gcry_ctz
Line
Count
Source
84
1.13k
{
85
1.13k
#if defined (HAVE_BUILTIN_CTZ)
86
1.13k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
1.13k
}
Unexecuted instantiation: rndjent.c:_gcry_ctz
sha1.c:_gcry_ctz
Line
Count
Source
84
7.54k
{
85
7.54k
#if defined (HAVE_BUILTIN_CTZ)
86
7.54k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
7.54k
}
sha256.c:_gcry_ctz
Line
Count
Source
84
3.99k
{
85
3.99k
#if defined (HAVE_BUILTIN_CTZ)
86
3.99k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
3.99k
}
sha512.c:_gcry_ctz
Line
Count
Source
84
2.84k
{
85
2.84k
#if defined (HAVE_BUILTIN_CTZ)
86
2.84k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
2.84k
}
sm3.c:_gcry_ctz
Line
Count
Source
84
1.00k
{
85
1.00k
#if defined (HAVE_BUILTIN_CTZ)
86
1.00k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
1.00k
}
stribog.c:_gcry_ctz
Line
Count
Source
84
1.03k
{
85
1.03k
#if defined (HAVE_BUILTIN_CTZ)
86
1.03k
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
1.03k
}
tiger.c:_gcry_ctz
Line
Count
Source
84
782
{
85
782
#if defined (HAVE_BUILTIN_CTZ)
86
782
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
782
}
whirlpool.c:_gcry_ctz
Line
Count
Source
84
887
{
85
887
#if defined (HAVE_BUILTIN_CTZ)
86
887
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
887
}
Unexecuted instantiation: blake2.c:_gcry_ctz
Unexecuted instantiation: cipher.c:_gcry_ctz
Unexecuted instantiation: crc.c:_gcry_ctz
Unexecuted instantiation: des.c:_gcry_ctz
Unexecuted instantiation: gost28147.c:_gcry_ctz
gostr3411-94.c:_gcry_ctz
Line
Count
Source
84
605
{
85
605
#if defined (HAVE_BUILTIN_CTZ)
86
605
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
87
#else
88
  /* See
89
   * http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup
90
   */
91
  static const unsigned char mod37[] =
92
    {
93
      sizeof (unsigned int)*8,
94
          0,  1, 26,  2, 23, 27,  0,  3, 16, 24, 30, 28, 11,  0, 13,
95
      4,  7, 17,  0, 25, 22, 31, 15, 29, 10, 12,  6,  0, 21, 14,  9,
96
      5, 20,  8, 19, 18
97
    };
98
  return (int)mod37[(-x & x) % 37];
99
#endif
100
605
}
Unexecuted instantiation: hash-common.c:_gcry_ctz
Unexecuted instantiation: idea.c:_gcry_ctz
Unexecuted instantiation: kdf.c:_gcry_ctz
Unexecuted instantiation: keccak.c:_gcry_ctz
Unexecuted instantiation: mac-hmac.c:_gcry_ctz
Unexecuted instantiation: mac-poly1305.c:_gcry_ctz
Unexecuted instantiation: poly1305.c:_gcry_ctz
Unexecuted instantiation: random-drbg.c:_gcry_ctz
Unexecuted instantiation: rfc2268.c:_gcry_ctz
Unexecuted instantiation: rijndael.c:_gcry_ctz
Unexecuted instantiation: salsa20.c:_gcry_ctz
Unexecuted instantiation: scrypt.c:_gcry_ctz
Unexecuted instantiation: seed.c:_gcry_ctz
Unexecuted instantiation: serpent.c:_gcry_ctz
Unexecuted instantiation: sm4.c:_gcry_ctz
Unexecuted instantiation: twofish.c:_gcry_ctz
Unexecuted instantiation: arcfour.c:_gcry_ctz
Unexecuted instantiation: aria.c:_gcry_ctz
Unexecuted instantiation: blowfish.c:_gcry_ctz
Unexecuted instantiation: camellia-glue.c:_gcry_ctz
Unexecuted instantiation: camellia.c:_gcry_ctz
Unexecuted instantiation: cast5.c:_gcry_ctz
Unexecuted instantiation: chacha20.c:_gcry_ctz
Unexecuted instantiation: cipher-aeswrap.c:_gcry_ctz
Unexecuted instantiation: cipher-cbc.c:_gcry_ctz
Unexecuted instantiation: cipher-ccm.c:_gcry_ctz
Unexecuted instantiation: cipher-cfb.c:_gcry_ctz
Unexecuted instantiation: cipher-cmac.c:_gcry_ctz
Unexecuted instantiation: cipher-ctr.c:_gcry_ctz
Unexecuted instantiation: cipher-eax.c:_gcry_ctz
Unexecuted instantiation: cipher-gcm-siv.c:_gcry_ctz
Unexecuted instantiation: cipher-gcm.c:_gcry_ctz
Unexecuted instantiation: cipher-ocb.c:_gcry_ctz
Unexecuted instantiation: cipher-ofb.c:_gcry_ctz
Unexecuted instantiation: cipher-poly1305.c:_gcry_ctz
Unexecuted instantiation: cipher-siv.c:_gcry_ctz
Unexecuted instantiation: cipher-xts.c:_gcry_ctz
Unexecuted instantiation: ec-nist.c:_gcry_ctz
Unexecuted instantiation: ecc-sm2.c:_gcry_ctz
Unexecuted instantiation: rijndael-padlock.c:_gcry_ctz
Unexecuted instantiation: rijndael-vaes.c:_gcry_ctz
101
102
103
/* Count trailing zero bits in an u64.  We return an int because that
104
   is what gcc's builtin does.  Returns the number of bits in X if X
105
   is 0.  */
106
static inline int
107
_gcry_ctz64(u64 x)
108
0
{
109
0
#if defined (HAVE_BUILTIN_CTZL) && SIZEOF_UNSIGNED_LONG >= 8
110
0
  return x ? __builtin_ctzl (x) : 8 * sizeof (x);
111
#elif defined (HAVE_BUILTIN_CTZ) && SIZEOF_UNSIGNED_INT >= 8
112
#warning hello
113
  return x ? __builtin_ctz (x) : 8 * sizeof (x);
114
#else
115
  if ((x & 0xffffffff))
116
    return _gcry_ctz (x);
117
  else
118
    return 32 + _gcry_ctz (x >> 32);
119
#endif
120
0
}
Unexecuted instantiation: md4.c:_gcry_ctz64
Unexecuted instantiation: md5.c:_gcry_ctz64
Unexecuted instantiation: mpicoder.c:_gcry_ctz64
Unexecuted instantiation: rmd160.c:_gcry_ctz64
Unexecuted instantiation: rndjent.c:_gcry_ctz64
Unexecuted instantiation: sha1.c:_gcry_ctz64
Unexecuted instantiation: sha256.c:_gcry_ctz64
Unexecuted instantiation: sha512.c:_gcry_ctz64
Unexecuted instantiation: sm3.c:_gcry_ctz64
Unexecuted instantiation: stribog.c:_gcry_ctz64
Unexecuted instantiation: tiger.c:_gcry_ctz64
Unexecuted instantiation: whirlpool.c:_gcry_ctz64
Unexecuted instantiation: blake2.c:_gcry_ctz64
Unexecuted instantiation: cipher.c:_gcry_ctz64
Unexecuted instantiation: crc.c:_gcry_ctz64
Unexecuted instantiation: des.c:_gcry_ctz64
Unexecuted instantiation: gost28147.c:_gcry_ctz64
Unexecuted instantiation: gostr3411-94.c:_gcry_ctz64
Unexecuted instantiation: hash-common.c:_gcry_ctz64
Unexecuted instantiation: idea.c:_gcry_ctz64
Unexecuted instantiation: kdf.c:_gcry_ctz64
Unexecuted instantiation: keccak.c:_gcry_ctz64
Unexecuted instantiation: mac-hmac.c:_gcry_ctz64
Unexecuted instantiation: mac-poly1305.c:_gcry_ctz64
Unexecuted instantiation: poly1305.c:_gcry_ctz64
Unexecuted instantiation: random-drbg.c:_gcry_ctz64
Unexecuted instantiation: rfc2268.c:_gcry_ctz64
Unexecuted instantiation: rijndael.c:_gcry_ctz64
Unexecuted instantiation: salsa20.c:_gcry_ctz64
Unexecuted instantiation: scrypt.c:_gcry_ctz64
Unexecuted instantiation: seed.c:_gcry_ctz64
Unexecuted instantiation: serpent.c:_gcry_ctz64
Unexecuted instantiation: sm4.c:_gcry_ctz64
Unexecuted instantiation: twofish.c:_gcry_ctz64
Unexecuted instantiation: arcfour.c:_gcry_ctz64
Unexecuted instantiation: aria.c:_gcry_ctz64
Unexecuted instantiation: blowfish.c:_gcry_ctz64
Unexecuted instantiation: camellia-glue.c:_gcry_ctz64
Unexecuted instantiation: camellia.c:_gcry_ctz64
Unexecuted instantiation: cast5.c:_gcry_ctz64
Unexecuted instantiation: chacha20.c:_gcry_ctz64
Unexecuted instantiation: cipher-aeswrap.c:_gcry_ctz64
Unexecuted instantiation: cipher-cbc.c:_gcry_ctz64
Unexecuted instantiation: cipher-ccm.c:_gcry_ctz64
Unexecuted instantiation: cipher-cfb.c:_gcry_ctz64
Unexecuted instantiation: cipher-cmac.c:_gcry_ctz64
Unexecuted instantiation: cipher-ctr.c:_gcry_ctz64
Unexecuted instantiation: cipher-eax.c:_gcry_ctz64
Unexecuted instantiation: cipher-gcm-siv.c:_gcry_ctz64
Unexecuted instantiation: cipher-gcm.c:_gcry_ctz64
Unexecuted instantiation: cipher-ocb.c:_gcry_ctz64
Unexecuted instantiation: cipher-ofb.c:_gcry_ctz64
Unexecuted instantiation: cipher-poly1305.c:_gcry_ctz64
Unexecuted instantiation: cipher-siv.c:_gcry_ctz64
Unexecuted instantiation: cipher-xts.c:_gcry_ctz64
Unexecuted instantiation: ec-nist.c:_gcry_ctz64
Unexecuted instantiation: ecc-sm2.c:_gcry_ctz64
Unexecuted instantiation: rijndael-padlock.c:_gcry_ctz64
Unexecuted instantiation: rijndael-vaes.c:_gcry_ctz64
121
122
123
#endif /*GCRYPT_BITHELP_H*/