]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/fips140/sha3: remove usages of WORD for s390x
authorRoland Shoemaker <roland@golang.org>
Thu, 8 May 2025 17:27:34 +0000 (10:27 -0700)
committerRoland Shoemaker <roland@golang.org>
Wed, 21 May 2025 19:10:20 +0000 (12:10 -0700)
We support KIMD and KLMD now, paves the way for banning usage of BYTE
and WORD instructions in crypto assembly.

Change-Id: I0f93744663f23866b2269591db70389e0c77fa4a
Reviewed-on: https://go-review.googlesource.com/c/go/+/671095
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/crypto/internal/fips140/sha3/sha3_s390x.s

index c3944da628eda104dfa18798e70bf0c218a4df21..0ce277160e76da6838bacd906bb965bb2abc5d83 100644 (file)
@@ -13,7 +13,7 @@ TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
        LMG  src+16(FP), R2, R3 // R2=base, R3=len
 
 continue:
-       WORD $0xB93E0002 // KIMD --, R2
+       KIMD R0, R2
        BVS  continue    // continue if interrupted
        MOVD $0, R0      // reset R0 for pre-go1.8 compilers
        RET
@@ -26,7 +26,7 @@ TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
        LMG  src+40(FP), R4, R5 // R4=base, R5=len
 
 continue:
-       WORD $0xB93F0024 // KLMD R2, R4
+       KLMD R2, R4
        BVS  continue    // continue if interrupted
        MOVD $0, R0      // reset R0 for pre-go1.8 compilers
        RET