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)
# $a4 = arg #5 (counter array)
beqz $len,.Lno_data
+ ori $t3,$zero,64
la.pcrel $t0,OPENSSL_loongarch_hwcap_P
ld.w $t0,$t0,0
$code .= <<EOF;
.align 6
.LChaCha20_4x:
- ori $t3,$zero,64
addi.d $sp,$sp,-128
# Save the initial block counter in $t4
$code .= <<EOF;
.align 6
.LChaCha20_8x:
- ori $t3,$zero,64
addi.d $sp,$sp,-128
# Save the initial block counter in $t4