]> git.proxmox.com Git - ceph.git/blob - ceph/src/isa-l/crc/aarch64/crc32_mix_neoverse_n1.S
import quincy beta 17.1.0
[ceph.git] / ceph / src / isa-l / crc / aarch64 / crc32_mix_neoverse_n1.S
1 /**********************************************************************
2 Copyright(c) 2020 Arm Corporation All rights reserved.
3
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions
6 are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in
11 the documentation and/or other materials provided with the
12 distribution.
13 * Neither the name of Arm Corporation nor the names of its
14 contributors may be used to endorse or promote products derived
15 from this software without specific prior written permission.
16
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 **********************************************************************/
29
30 .text
31 .align 6
32 .arch armv8-a+crypto+crc
33
34 #include "crc32_common_mix_neoverse_n1.S"
35 .Lconstants:
36 .octa 0x00000001c6e415960000000154442bd4
37 .octa 0x00000000ccaa009e00000001751997d0
38 .octa 0x00000001F701164100000001DB710641
39 .quad 0x0000000163cd6124
40 .quad 0x00000000FFFFFFFF
41 .quad 0x000000001753ab84
42 .macro crc32_u64 dst,src,data
43 crc32x \dst,\src,\data
44 .endm
45 .macro crc32_u32 dst,src,data
46 crc32w \dst,\src,\data
47 .endm
48 .macro crc32_u16 dst,src,data
49 crc32h \dst,\src,\data
50 .endm
51 .macro crc32_u8 dst,src,data
52 crc32b \dst,\src,\data
53 .endm
54
55
56 /**
57 * uint32_t crc32_mix_neoverse_n1(uint CRC ,uint8_t * BUF,
58 * size_t LEN)
59 */
60 BUF .req x1
61 LEN .req x2
62 CRC .req x0
63 wCRC .req w0
64 .align 6
65 .global crc32_mix_neoverse_n1
66 .type crc32_mix_neoverse_n1, %function
67 crc32_mix_neoverse_n1:
68 crc32_common_mix crc32
69 .size crc32_mix_neoverse_n1, .-crc32_mix_neoverse_n1
70