Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
David S. Miller | 442a7c4 | 2012-08-22 20:47:36 -0700 | [diff] [blame] | 2 | #include <linux/linkage.h> |
| 3 | #include <asm/visasm.h> |
| 4 | #include <asm/asi.h> |
| 5 | |
David S. Miller | 7cff82f | 2012-08-31 12:11:51 -0700 | [diff] [blame] | 6 | #include "opcodes.h" |
David S. Miller | 442a7c4 | 2012-08-22 20:47:36 -0700 | [diff] [blame] | 7 | |
| 8 | ENTRY(crc32c_sparc64) |
| 9 | /* %o0=crc32p, %o1=data_ptr, %o2=len */ |
| 10 | VISEntryHalf |
| 11 | lda [%o0] ASI_PL, %f1 |
| 12 | 1: ldd [%o1], %f2 |
| 13 | CRC32C(0,2,0) |
| 14 | subcc %o2, 8, %o2 |
| 15 | bne,pt %icc, 1b |
| 16 | add %o1, 0x8, %o1 |
| 17 | sta %f1, [%o0] ASI_PL |
| 18 | VISExitHalf |
| 19 | 2: retl |
| 20 | nop |
| 21 | ENDPROC(crc32c_sparc64) |