cpu_s390x.s raw

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