1*f1f99adfSSid Manning/* SPDX-License-Identifier: GPL-2.0-only */ 2*f1f99adfSSid Manning/* 3*f1f99adfSSid Manning * Copyright (c) 2021, The Linux Foundation. All rights reserved. 4*f1f99adfSSid Manning */ 5*f1f99adfSSid Manning 6*f1f99adfSSid Manning#include <linux/linkage.h> 7*f1f99adfSSid Manning 8*f1f99adfSSid ManningSYM_FUNC_START(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes) 9*f1f99adfSSid Manning { 10*f1f99adfSSid Manning p0 = bitsclr(r1,#7) 11*f1f99adfSSid Manning p0 = bitsclr(r0,#7) 12*f1f99adfSSid Manning if (p0.new) r5:4 = memd(r1) 13*f1f99adfSSid Manning if (p0.new) r7:6 = memd(r1+#8) 14*f1f99adfSSid Manning } 15*f1f99adfSSid Manning { 16*f1f99adfSSid Manning if (!p0) jump:nt .Lmemcpy_call 17*f1f99adfSSid Manning if (p0) r9:8 = memd(r1+#16) 18*f1f99adfSSid Manning if (p0) r11:10 = memd(r1+#24) 19*f1f99adfSSid Manning p0 = cmp.gtu(r2,#64) 20*f1f99adfSSid Manning } 21*f1f99adfSSid Manning { 22*f1f99adfSSid Manning if (p0) jump:nt .Lmemcpy_call 23*f1f99adfSSid Manning if (!p0) memd(r0) = r5:4 24*f1f99adfSSid Manning if (!p0) memd(r0+#8) = r7:6 25*f1f99adfSSid Manning p0 = cmp.gtu(r2,#32) 26*f1f99adfSSid Manning } 27*f1f99adfSSid Manning { 28*f1f99adfSSid Manning p1 = cmp.gtu(r2,#40) 29*f1f99adfSSid Manning p2 = cmp.gtu(r2,#48) 30*f1f99adfSSid Manning if (p0) r13:12 = memd(r1+#32) 31*f1f99adfSSid Manning if (p1.new) r15:14 = memd(r1+#40) 32*f1f99adfSSid Manning } 33*f1f99adfSSid Manning { 34*f1f99adfSSid Manning memd(r0+#16) = r9:8 35*f1f99adfSSid Manning memd(r0+#24) = r11:10 36*f1f99adfSSid Manning } 37*f1f99adfSSid Manning { 38*f1f99adfSSid Manning if (p0) memd(r0+#32) = r13:12 39*f1f99adfSSid Manning if (p1) memd(r0+#40) = r15:14 40*f1f99adfSSid Manning if (!p2) jumpr:t r31 41*f1f99adfSSid Manning } 42*f1f99adfSSid Manning { 43*f1f99adfSSid Manning p0 = cmp.gtu(r2,#56) 44*f1f99adfSSid Manning r5:4 = memd(r1+#48) 45*f1f99adfSSid Manning if (p0.new) r7:6 = memd(r1+#56) 46*f1f99adfSSid Manning } 47*f1f99adfSSid Manning { 48*f1f99adfSSid Manning memd(r0+#48) = r5:4 49*f1f99adfSSid Manning if (p0) memd(r0+#56) = r7:6 50*f1f99adfSSid Manning jumpr r31 51*f1f99adfSSid Manning } 52*f1f99adfSSid Manning 53*f1f99adfSSid Manning.Lmemcpy_call: 54*f1f99adfSSid Manning jump memcpy 55*f1f99adfSSid Manning 56*f1f99adfSSid ManningSYM_FUNC_END(__hexagon_memcpy_likely_aligned_min32bytes_mult8bytes) 57