Debian Codegraph @

hash/sha3/sha3_s390x.s

raw
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 //+build !gccgo,!appengine
6
7 #include "textflag.h"
8
9 TEXT ·hasMSA6(SB), NOSPLIT, $16-1
10 MOVD $0, R0 // KIMD-Query function code
11 MOVD $tmp-16(SP), R1 // parameter block
12 XC $16, (R1), (R1) // clear the parameter block
13 WORD $0xB93E0002 // KIMD --, --
14 WORD $0x91FC1004 // TM 4(R1), 0xFC (test bits [32-37])
15 BVS yes
16
17 no:
18 MOVB $0, ret+0(FP)
19 RET
20
21 yes:
22 MOVB $1, ret+0(FP)
23 RET
24
25 // func kimd(function code, params *[200]byte, src []byte)
26 TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
27 MOVD function+0(FP), R0
28 MOVD params+8(FP), R1
29 LMG src+16(FP), R2, R3 // R2=base, R3=len
30
31 continue:
32 WORD $0xB93E0002 // KIMD --, R2
33 BVS continue // continue if interrupted
34 MOVD $0, R0 // reset R0 for pre-go1.8 compilers
35 RET
36
37 // func klmd(function code, params *[200]byte, dst, src []byte)
38 TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
39 // TODO: SHAKE support
40 MOVD function+0(FP), R0
41 MOVD params+8(FP), R1
42 LMG dst+16(FP), R2, R3 // R2=base, R3=len
43 LMG src+40(FP), R4, R5 // R4=base, R5=len
44
45 continue:
46 WORD $0xB93F0024 // KLMD R2, R4
47 BVS continue // continue if interrupted
48 MOVD $0, R0 // reset R0 for pre-go1.8 compilers
49 RET