Merge branch 'stable/for-linus-fixes-3.3' of git://git.kernel.org/pub/scm/linux/kerne...
[linux-2.6-block.git] / arch / c6x / lib / memcpy_64plus.S
CommitLineData
09831ca7
AJ
1; Port on Texas Instruments TMS320C6x architecture
2;
3; Copyright (C) 2006, 2009, 2010 Texas Instruments Incorporated
4; Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
5;
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.
9;
10
11#include <linux/linkage.h>
12
13 .text
14
15ENTRY(memcpy)
16 AND .L1 0x1,A6,A0
17 || AND .S1 0x2,A6,A1
18 || AND .L2X 0x4,A6,B0
19 || MV .D1 A4,A3
20 || MVC .S2 ILC,B2
21
22 [A0] LDB .D2T1 *B4++,A5
23 [A1] LDB .D2T1 *B4++,A7
24 [A1] LDB .D2T1 *B4++,A8
25 [B0] LDNW .D2T1 *B4++,A9
26 || SHRU .S2X A6,0x3,B1
27 [!B1] BNOP .S2 B3,1
28
29 [A0] STB .D1T1 A5,*A3++
30 ||[B1] MVC .S2 B1,ILC
31 [A1] STB .D1T1 A7,*A3++
32 [A1] STB .D1T1 A8,*A3++
33 [B0] STNW .D1T1 A9,*A3++ ; return when len < 8
34
35 SPLOOP 2
36
37 LDNDW .D2T1 *B4++,A9:A8
38 NOP 3
39
40 NOP
41 SPKERNEL 0,0
42 || STNDW .D1T1 A9:A8,*A3++
43
44 BNOP .S2 B3,4
45 MVC .S2 B2,ILC
46ENDPROC(memcpy)