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