cpu_s390x.s 2.0 KB

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