1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * Copyright (C) 2021 SiFive 4 */ 5 #include <linux/linkage.h> 6 #include <linux/export.h> 7 #include <asm/asm.h> 8 9 SYM_FUNC_START(xor_regs_2_) 10 vsetvli a3, a0, e8, m8, ta, ma 11 vle8.v v0, (a1) 12 vle8.v v8, (a2) 13 sub a0, a0, a3 14 vxor.vv v16, v0, v8 15 add a2, a2, a3 16 vse8.v v16, (a1) 17 add a1, a1, a3 18 bnez a0, xor_regs_2_ 19 ret 20 SYM_FUNC_END(xor_regs_2_) 21 EXPORT_SYMBOL(xor_regs_2_) 22 23 SYM_FUNC_START(xor_regs_3_) 24 vsetvli a4, a0, e8, m8, ta, ma 25 vle8.v v0, (a1) 26 vle8.v v8, (a2) 27 sub a0, a0, a4 28 vxor.vv v0, v0, v8 29 vle8.v v16, (a3) 30 add a2, a2, a4 31 vxor.vv v16, v0, v16 32 add a3, a3, a4 33 vse8.v v16, (a1) 34 add a1, a1, a4 35 bnez a0, xor_regs_3_ 36 ret 37 SYM_FUNC_END(xor_regs_3_) 38 EXPORT_SYMBOL(xor_regs_3_) 39 40 SYM_FUNC_START(xor_regs_4_) 41 vsetvli a5, a0, e8, m8, ta, ma 42 vle8.v v0, (a1) 43 vle8.v v8, (a2) 44 sub a0, a0, a5 45 vxor.vv v0, v0, v8 46 vle8.v v16, (a3) 47 add a2, a2, a5 48 vxor.vv v0, v0, v16 49 vle8.v v24, (a4) 50 add a3, a3, a5 51 vxor.vv v16, v0, v24 52 add a4, a4, a5 53 vse8.v v16, (a1) 54 add a1, a1, a5 55 bnez a0, xor_regs_4_ 56 ret 57 SYM_FUNC_END(xor_regs_4_) 58 EXPORT_SYMBOL(xor_regs_4_) 59 60 SYM_FUNC_START(xor_regs_5_) 61 vsetvli a6, a0, e8, m8, ta, ma 62 vle8.v v0, (a1) 63 vle8.v v8, (a2) 64 sub a0, a0, a6 65 vxor.vv v0, v0, v8 66 vle8.v v16, (a3) 67 add a2, a2, a6 68 vxor.vv v0, v0, v16 69 vle8.v v24, (a4) 70 add a3, a3, a6 71 vxor.vv v0, v0, v24 72 vle8.v v8, (a5) 73 add a4, a4, a6 74 vxor.vv v16, v0, v8 75 add a5, a5, a6 76 vse8.v v16, (a1) 77 add a1, a1, a6 78 bnez a0, xor_regs_5_ 79 ret 80 SYM_FUNC_END(xor_regs_5_) 81 EXPORT_SYMBOL(xor_regs_5_)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.