Home GnuPG

Remove i386 inline assembly version of rotation functions
cfea5c28a382Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Remove i386 inline assembly version of rotation functions

* cipher/bithelp.h (rol, ror): Remove i386 version, change
macros to inline functions.
* src/hmac256.c (ror): Ditto.

(Current) compilers can optimize '(x << c) | (x >> (32-c))' to rotation
instruction. So remove i386 specific assembly for manually doing this.
Furthermore, compiler can generate faster code in case where 'c' is
constant and can use rotate with immediate value rather than rotate
with %cl register.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Sep 21 2013, 12:54 PM
Parents
rC9337e03824a5: Optimize and cleanup 32-bit and 64-bit endianess transforms
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rCcfea5c28a382: Remove i386 inline assembly version of rotation functions (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Sep 21 2013, 2:34 PM