sha3_s390x.s (978B)
1 // Copyright 2017 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build gc && !purego 6 // +build gc,!purego 7 8 #include "textflag.h" 9 10 // func kimd(function code, chain *[200]byte, src []byte) 11 TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40 12 MOVD function+0(FP), R0 13 MOVD chain+8(FP), R1 14 LMG src+16(FP), R2, R3 // R2=base, R3=len 15 16 continue: 17 WORD $0xB93E0002 // KIMD --, R2 18 BVS continue // continue if interrupted 19 MOVD $0, R0 // reset R0 for pre-go1.8 compilers 20 RET 21 22 // func klmd(function code, chain *[200]byte, dst, src []byte) 23 TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64 24 // TODO: SHAKE support 25 MOVD function+0(FP), R0 26 MOVD chain+8(FP), R1 27 LMG dst+16(FP), R2, R3 // R2=base, R3=len 28 LMG src+40(FP), R4, R5 // R4=base, R5=len 29 30 continue: 31 WORD $0xB93F0024 // KLMD R2, R4 32 BVS continue // continue if interrupted 33 MOVD $0, R0 // reset R0 for pre-go1.8 compilers 34 RET