Fix performance regression of ChaCha20 on LoongArch64
authorLin Runze <lrzlin@163.com>
Sun, 14 Jan 2024 12:21:49 +0000 (20:21 +0800)
committerTomas Mraz <tomas@openssl.org>
Wed, 17 Jan 2024 08:40:04 +0000 (09:40 +0100)
commit971028535e6531c89449e06b1f6862c18f04ff91
treecffa6ebccb1f3392f7bf23eb3a4d82281b68fa9d
parent2f85736e9c66248528f132d46508f06a0bb8dd88
Fix performance regression of ChaCha20 on LoongArch64

The regression was introduced in PR #22817.

In that pull request, the input length check was moved forward,
but the related ori instruction was missing, and it will cause
input of any length down to the much slower scalar implementation.

Fixes #23300

CLA: trivial

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23301)
crypto/chacha/asm/chacha-loongarch64.pl