]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/sparc/sparc64/align-cpy.S
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / sparc / sparc64 / align-cpy.S
CommitLineData
dbcaf07c
DM
1/* Aligned copy routines specified by Sparc V9 ABI.
2 For 64-bit sparc.
f7a9f785 3 Copyright (C) 2010-2016 Free Software Foundation, Inc.
dbcaf07c
DM
4 This file is part of the GNU C Library.
5 Contributed by David S. Miller (davem@davemloft.net)
6
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
18 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
dbcaf07c
DM
20
21#include <sysdep.h>
22
23 .text
24 .align 8
25ENTRY(__align_cpy_8)
2610: cmp %o0, %o1
27 be,pn %xcc, 9f
28 mov %o0, %o3
29 subcc %o2, 0x08, %o2
30 be,pn %xcc, 8f
311: ldx [%o1 + 0x00], %o5
32 ldx [%o1 + 0x08], %o4
33 subcc %o2, 0x10, %o2
34 add %o1, 0x10, %o1
35 stx %o5, [%o3 + 0x00]
36 stx %o4, [%o3 + 0x08]
37 bg,pt %xcc, 1b
38 add %o3, 0x10, %o3
39 bne,pn %xcc, 9f
40 nop
41 ldx [%o1 + 0x00], %o5
428: stx %o5, [%o3 + 0x00]
439: retl
44 nop
45END(__align_cpy_8)
46
47 .align 8
48ENTRY(__align_cpy_4)
4920: cmp %o0, %o1
50 be,pn %xcc, 9f
51 mov %o0, %o3
52 subcc %o2, 0x04, %o2
53 be,pn %xcc, 8f
541: lduw [%o1 + 0x00], %o5
55 lduw [%o1 + 0x04], %o4
56 subcc %o2, 0x08, %o2
57 add %o1, 0x08, %o1
58 stw %o5, [%o3 + 0x00]
59 stw %o4, [%o3 + 0x04]
60 bg,pt %xcc, 1b
61 add %o3, 0x08, %o3
62 bne,pn %xcc, 9f
63 nop
64 lduw [%o1 + 0x00], %o5
658: stw %o5, [%o3 + 0x00]
669: retl
67 nop
68END(__align_cpy_4)
69
70 .align 8
71ENTRY(__align_cpy_2)
72 or %o0, %o1, %o3
73 or %o2, %o3, %o3
74 andcc %o3, 0x7, %g0
75 be,pt %xcc, 10b
76 andcc %o3, 0x3, %g0
77 be,pt %xcc, 20b
78 mov %o7, %g1
79 call HIDDEN_JUMPTARGET(memcpy)
80 mov %o7, %g1
81END(__align_cpy_2)
82
83weak_alias (__align_cpy_8, __align_cpy_16)
84weak_alias (__align_cpy_2, __align_cpy_1)