aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/go/_std_1.22/src/crypto/sha1/sha1block_s390x.s
blob: 0fb7aef28371fcd38feb70443a8877610a7ab7fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#include "textflag.h"

// func block(dig *digest, p []byte)
TEXT ·block(SB), NOSPLIT|NOFRAME, $0-32
	MOVBZ  ·useAsm(SB), R4
	LMG    dig+0(FP), R1, R3            // R2 = &p[0], R3 = len(p)
	MOVBZ  $1, R0                       // SHA-1 function code
	CMPBEQ R4, $0, generic

loop:
	KIMD R0, R2      // compute intermediate message digest (KIMD)
	BVS  loop        // continue if interrupted
	RET

generic:
	BR ·blockGeneric(SB)