]>
Commit | Line | Data |
---|---|---|
20effc67 TL |
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 | .arch armv8-a+crypto+crc | |
31 | .text | |
32 | .align 6 | |
33 | ||
34 | #define CRC32 | |
35 | ||
36 | .macro crc32_u64 dst,src,data | |
37 | crc32x \dst,\src,\data | |
38 | .endm | |
39 | ||
40 | .macro crc32_u32 dst,src,data | |
41 | crc32w \dst,\src,\data | |
42 | .endm | |
43 | ||
44 | .macro crc32_u16 dst,src,data | |
45 | crc32h \dst,\src,\data | |
46 | .endm | |
47 | ||
48 | .macro crc32_u8 dst,src,data | |
49 | crc32b \dst,\src,\data | |
50 | .endm | |
51 | ||
52 | #include "crc32_mix_default_common.S" | |
53 | ||
54 | .global crc32_mix_default | |
55 | .type crc32_mix_default, %function | |
56 | crc32_mix_default: | |
57 | crc32_mix_main_default | |
58 | .size crc32_mix_default, .-crc32_mix_default | |
59 | ||
60 | .section .rodata | |
61 | .align 4 | |
62 | .set lanchor_crc32,. + 0 | |
63 | ||
64 | .type k1k2, %object | |
65 | .size k1k2, 16 | |
66 | k1k2: | |
67 | .xword 0x0154442bd4 | |
68 | .xword 0x01c6e41596 | |
69 | ||
70 | .type k3k4, %object | |
71 | .size k3k4, 16 | |
72 | k3k4: | |
73 | .xword 0x01751997d0 | |
74 | .xword 0x00ccaa009e | |
75 | ||
76 | .type k5k0, %object | |
77 | .size k5k0, 16 | |
78 | k5k0: | |
79 | .xword 0x0163cd6124 | |
80 | .xword 0 | |
81 | ||
82 | .type poly, %object | |
83 | .size poly, 16 | |
84 | poly: | |
85 | .xword 0x01db710641 | |
86 | .xword 0x01f7011641 | |
87 | ||
88 | .type crc32_const, %object | |
89 | .size crc32_const, 48 | |
90 | crc32_const: | |
91 | .xword 0x1753ab84 | |
92 | .xword 0 | |
93 | .xword 0xbbf2f6d6 | |
94 | .xword 0 | |
95 | .xword 0x0c30f51d | |
96 | .xword 0 | |
97 | ||
98 | .align 4 | |
99 | .set .lanchor_mask,. + 0 | |
100 | ||
101 | .type mask, %object | |
102 | .size mask, 16 | |
103 | mask: | |
104 | .word -1 | |
105 | .word 0 | |
106 | .word -1 | |
107 | .word 0 |