github.com/primecitizens/pcz/std@v0.2.1/core/cpu/cpu_s390x.s (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  //
     4  // Copyright 2018 The Go Authors. All rights reserved.
     5  // Use of this source code is governed by a BSD-style
     6  // license that can be found in the LICENSE file.
     7  
     8  //go:build s390x
     9  
    10  #include "textflag.h"
    11  
    12  // func stfle() facilityList
    13  TEXT ·stfle(SB), NOSPLIT|NOFRAME, $0-32
    14  	MOVD $ret+0(FP), R1
    15  	MOVD $3, R0          // last doubleword index to store
    16  	XC   $32, (R1), (R1) // clear 4 doublewords (32 bytes)
    17  	WORD $0xb2b01000     // store facility list extended (STFLE)
    18  	RET
    19  
    20  // func kmQuery() queryResult
    21  TEXT ·kmQuery(SB), NOSPLIT|NOFRAME, $0-16
    22  	MOVD $0, R0         // set function code to 0 (KM-Query)
    23  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    24  	WORD $0xB92E0024    // cipher message (KM)
    25  	RET
    26  
    27  // func kmcQuery() queryResult
    28  TEXT ·kmcQuery(SB), NOSPLIT|NOFRAME, $0-16
    29  	MOVD $0, R0         // set function code to 0 (KMC-Query)
    30  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    31  	WORD $0xB92F0024    // cipher message with chaining (KMC)
    32  	RET
    33  
    34  // func kmctrQuery() queryResult
    35  TEXT ·kmctrQuery(SB), NOSPLIT|NOFRAME, $0-16
    36  	MOVD $0, R0         // set function code to 0 (KMCTR-Query)
    37  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    38  	WORD $0xB92D4024    // cipher message with counter (KMCTR)
    39  	RET
    40  
    41  // func kmaQuery() queryResult
    42  TEXT ·kmaQuery(SB), NOSPLIT|NOFRAME, $0-16
    43  	MOVD $0, R0         // set function code to 0 (KMA-Query)
    44  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    45  	WORD $0xb9296024    // cipher message with authentication (KMA)
    46  	RET
    47  
    48  // func kimdQuery() queryResult
    49  TEXT ·kimdQuery(SB), NOSPLIT|NOFRAME, $0-16
    50  	MOVD $0, R0         // set function code to 0 (KIMD-Query)
    51  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    52  	WORD $0xB93E0024    // compute intermediate message digest (KIMD)
    53  	RET
    54  
    55  // func klmdQuery() queryResult
    56  TEXT ·klmdQuery(SB), NOSPLIT|NOFRAME, $0-16
    57  	MOVD $0, R0         // set function code to 0 (KLMD-Query)
    58  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    59  	WORD $0xB93F0024    // compute last message digest (KLMD)
    60  	RET
    61  
    62  // func kdsaQuery() queryResult
    63  TEXT ·kdsaQuery(SB), NOSPLIT|NOFRAME, $0-16
    64  	MOVD $0, R0         // set function code to 0 (KLMD-Query)
    65  	MOVD $ret+0(FP), R1 // address of 16-byte return value
    66  	WORD $0xB93A0008    // compute digital signature authentication
    67  	RET
    68