From: Holger Dengler Date: Wed, 26 Nov 2025 15:18:37 +0000 (+0100) Subject: s390x: Return condition code of kdsa instruction X-Git-Tag: 3.6-PRE-CLANG-FORMAT-WEBKIT~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbe27bc97fb35058b9b23478ebf97202461f9c92;p=thirdparty%2Fopenssl.git s390x: Return condition code of kdsa instruction The kdsa instruction is doing some parameter checking for the verify function codes, like r/s equals zero and range checks. To handle these cases correctly in the calling functions, the asm returns now also condition code 2. Signed-off-by: Holger Dengler Reviewed-by: Dmitry Belyavskiy Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/29214) (cherry picked from commit bcaa2a3af60c3c1f282b621522bbc316341bf692) --- diff --git a/crypto/s390xcpuid.pl b/crypto/s390xcpuid.pl index a14e577ef6c..36457d798a1 100755 --- a/crypto/s390xcpuid.pl +++ b/crypto/s390xcpuid.pl @@ -461,16 +461,12 @@ $code.=<<___; s390x_kdsa: lr %r0,$fc l${g}r %r1,$param - lhi %r2,0 .long 0xb93a0004 # kdsa %r0,$in brc 1,.-4 # pay attention to "partial completion" - brc 7,.Lkdsa_err # if CC==0 return 0, else return 1 -.Lkdsa_out: + ipm %r2 # load program mask and + srl %r2,28 # extract cc br $ra -.Lkdsa_err: - lhi %r2,1 - j .Lkdsa_out .size s390x_kdsa,.-s390x_kdsa ___ }