You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sha3_s390x.s 957B

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