1// Copyright 2018 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#include "textflag.h"
6
7// func stfle() facilityList
8TEXT ·stfle(SB), NOSPLIT|NOFRAME, $0-32
9	MOVD $ret+0(FP), R1
10	MOVD $3, R0          // last doubleword index to store
11	XC   $32, (R1), (R1) // clear 4 doublewords (32 bytes)
12	WORD $0xb2b01000     // store facility list extended (STFLE)
13	RET
14
15// func kmQuery() queryResult
16TEXT ·kmQuery(SB), NOSPLIT|NOFRAME, $0-16
17	MOVD $0, R0         // set function code to 0 (KM-Query)
18	MOVD $ret+0(FP), R1 // address of 16-byte return value
19	WORD $0xB92E0024    // cipher message (KM)
20	RET
21
22// func kmcQuery() queryResult
23TEXT ·kmcQuery(SB), NOSPLIT|NOFRAME, $0-16
24	MOVD $0, R0         // set function code to 0 (KMC-Query)
25	MOVD $ret+0(FP), R1 // address of 16-byte return value
26	WORD $0xB92F0024    // cipher message with chaining (KMC)
27	RET
28
29// func kmctrQuery() queryResult
30TEXT ·kmctrQuery(SB), NOSPLIT|NOFRAME, $0-16
31	MOVD $0, R0         // set function code to 0 (KMCTR-Query)
32	MOVD $ret+0(FP), R1 // address of 16-byte return value
33	WORD $0xB92D4024    // cipher message with counter (KMCTR)
34	RET
35
36// func kmaQuery() queryResult
37TEXT ·kmaQuery(SB), NOSPLIT|NOFRAME, $0-16
38	MOVD $0, R0         // set function code to 0 (KMA-Query)
39	MOVD $ret+0(FP), R1 // address of 16-byte return value
40	WORD $0xb9296024    // cipher message with authentication (KMA)
41	RET
42
43// func kimdQuery() queryResult
44TEXT ·kimdQuery(SB), NOSPLIT|NOFRAME, $0-16
45	MOVD $0, R0         // set function code to 0 (KIMD-Query)
46	MOVD $ret+0(FP), R1 // address of 16-byte return value
47	WORD $0xB93E0024    // compute intermediate message digest (KIMD)
48	RET
49
50// func klmdQuery() queryResult
51TEXT ·klmdQuery(SB), NOSPLIT|NOFRAME, $0-16
52	MOVD $0, R0         // set function code to 0 (KLMD-Query)
53	MOVD $ret+0(FP), R1 // address of 16-byte return value
54	WORD $0xB93F0024    // compute last message digest (KLMD)
55	RET
56