summaryrefslogtreecommitdiffstats
path: root/arch/c6x/lib/memcpy_64plus.S
blob: 0bbc2cbf93189d5dd5525ba5ad671af8b0a4f014 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;  Port on Texas Instruments TMS320C6x architecture
;
;  Copyright (C) 2006, 2009, 2010 Texas Instruments Incorporated
;  Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
;
;  This program is free software; you can redistribute it and/or modify
;  it under the terms of the GNU General Public License version 2 as
;  published by the Free Software Foundation.
;

#include <linux/linkage.h>

	.text

ENTRY(memcpy)
	AND	.L1	0x1,A6,A0
 ||	AND	.S1	0x2,A6,A1
 ||	AND	.L2X	0x4,A6,B0
 ||	MV	.D1	A4,A3
 ||	MVC	.S2	ILC,B2

   [A0] LDB	.D2T1	*B4++,A5
   [A1] LDB	.D2T1	*B4++,A7
   [A1] LDB	.D2T1	*B4++,A8
   [B0] LDNW	.D2T1	*B4++,A9
 ||	SHRU	.S2X	A6,0x3,B1
  [!B1] BNOP	.S2	B3,1

   [A0] STB	.D1T1	A5,*A3++
 ||[B1] MVC	.S2	B1,ILC
   [A1] STB	.D1T1	A7,*A3++
   [A1] STB	.D1T1	A8,*A3++
   [B0] STNW	.D1T1	A9,*A3++	; return when len < 8

	SPLOOP	2

	LDNDW	.D2T1	*B4++,A9:A8
	NOP	3

	NOP
	SPKERNEL	0,0
 ||	STNDW	.D1T1	A9:A8,*A3++

	BNOP	.S2	B3,4
	MVC	.S2	B2,ILC
ENDPROC(memcpy)
OpenPOWER on IntegriCloud