summaryrefslogtreecommitdiff
path: root/lib/libcurses/curs_slk.3
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2023-05-17 06:37:15 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2023-05-17 06:37:15 +0000
commit10c5d1ee81ed9ba0f1a9f98094e79bbb3e60d500 (patch)
tree1e8e2ab34f6e51522cb30f81898075d96c9d2704 /lib/libcurses/curs_slk.3
parent0b6c46f6c7100bb21c66d5504b785fd88ec5d7a3 (diff)
Clean up alignment handling for SHA-512.
All assembly implementations are required to perform their own alignment handling. In the case of the C implementation, on strict alignment platforms, unaligned data will be copied into an aligned buffer. However, most platforms then perform byte-by-byte reads (via the PULL64 macros). Instead, remove SHA512_BLOCK_CAN_MANAGE_UNALIGNED_DATA and alignment handling to sha512_block_data_order() - if the data is aligned then simply perform 64 bit loads and then do endian conversion via be64toh(). If the data is unaligned then use memcpy() and be64toh() (in the form of crypto_load_be64toh()). Overall this reduces complexity and can improve performance (on aarch64 we get a ~10% performance gain with aligned input and about ~1-2% gain on armv7), while the same movq/bswapq is generated for amd64 and movl/bswapl for i386. ok tb@
Diffstat (limited to 'lib/libcurses/curs_slk.3')
0 files changed, 0 insertions, 0 deletions