tls: fix ROL/ROR x86 optimization
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 19 Jan 2017 15:45:41 +0000 (16:45 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 19 Jan 2017 15:45:41 +0000 (16:45 +0100)
commitf7806f9d8fc889f1d6cd365b69d9d99a4a5a6e26
treef7dca43d7506da675080d3a3b26dcde3835ecdeb
parent432f1ae2ff184e07fa78bd3797073094069e521d
tls: fix ROL/ROR x86 optimization

ALWAYS_INLINE:

function                                             old     new   delta
psAesInitKey                                         825     824      -1
ROR                                                    5       -      -5
setup_mix2                                           148     134     -14
psAesDecryptBlock                                   1184    1139     -45
psAesEncryptBlock                                   1193    1102     -91
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/4 up/down: 0/-156)           Total: -156 bytes

ALWAYS_INLINE + __builtin_constant_p(shift_cnt):

function                                             old     new   delta
ROR                                                    5       -      -5
psAesInitKey                                         825     818      -7
setup_mix2                                           148     123     -25
psAesDecryptBlock                                   1184    1078    -106
psAesEncryptBlock                                   1193    1017    -176
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/4 up/down: 0/-319)           Total: -319 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/tls_symmetric.h