# pahole -C bn_mont_ctx_st ./crypto/bn/libcrypto-shlib-bn_mont.o
struct bn_mont_ctx_st {
int ri; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
BIGNUM RR; /* 8 24 */
BIGNUM N; /* 32 24 */
BIGNUM Ni; /* 56 24 */
/* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */
long unsigned int n0[2]; /* 80 16 */
int flags; /* 96 4 */
/* size: 104, cachelines: 2, members: 6 */
/* sum members: 96, holes: 1, sum holes: 4 */
/* padding: 4 */
/* last cacheline: 40 bytes */
};
# pahole -C bn_mont_ctx_st ./crypto/bn/libcrypto-shlib-bn_mont.o
struct bn_mont_ctx_st {
BIGNUM RR; /* 0 24 */
BIGNUM N; /* 24 24 */
BIGNUM Ni; /* 48 24 */
/* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
long unsigned int n0[2]; /* 72 16 */
int ri; /* 88 4 */
int flags; /* 92 4 */
/* size: 96, cachelines: 2, members: 6 */
/* last cacheline: 32 bytes */
};
8 bytes were saved.
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28185)
/* Used for montgomery multiplication */
struct bn_mont_ctx_st {
- int ri; /* number of bits in R */
BIGNUM RR; /* used to convert to montgomery form,
possibly zero-padded */
BIGNUM N; /* The modulus */
BN_ULONG n0[2]; /* least significant word(s) of Ni; (type
* changed with 0.9.9, was "BN_ULONG n0;"
* before) */
+ int ri; /* number of bits in R */
int flags;
};