sha3_s390x.s 978 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2017 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. //go:build gc && !purego
  5. // +build gc,!purego
  6. #include "textflag.h"
  7. // func kimd(function code, chain *[200]byte, src []byte)
  8. TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
  9. MOVD function+0(FP), R0
  10. MOVD chain+8(FP), R1
  11. LMG src+16(FP), R2, R3 // R2=base, R3=len
  12. continue:
  13. WORD $0xB93E0002 // KIMD --, R2
  14. BVS continue // continue if interrupted
  15. MOVD $0, R0 // reset R0 for pre-go1.8 compilers
  16. RET
  17. // func klmd(function code, chain *[200]byte, dst, src []byte)
  18. TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
  19. // TODO: SHAKE support
  20. MOVD function+0(FP), R0
  21. MOVD chain+8(FP), R1
  22. LMG dst+16(FP), R2, R3 // R2=base, R3=len
  23. LMG src+40(FP), R4, R5 // R4=base, R5=len
  24. continue:
  25. WORD $0xB93F0024 // KLMD R2, R4
  26. BVS continue // continue if interrupted
  27. MOVD $0, R0 // reset R0 for pre-go1.8 compilers
  28. RET