2 * Accelerated CRC32(C) using AArch64 CRC instructions
4 * Copyright (C) 2016 - 2018 Linaro Ltd <ard.biesheuvel@linaro.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #include <linux/linkage.h>
12 #include <asm/alternative.h>
13 #include <asm/assembler.h>
23 crc32\c\()x w0, w0, x3
24 crc32\c\()x w0, w0, x4
31 crc32\c\()x w0, w0, x3
35 crc32\c\()w w0, w0, w3
38 CPU_BE( rev16 w3, w3 )
39 crc32\c\()h w0, w0, w3
42 crc32\c\()b w0, w0, w3
48 alternative_if_not ARM64_HAS_CRC32
50 alternative_else_nop_endif
56 alternative_if_not ARM64_HAS_CRC32
58 alternative_else_nop_endif