diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
commit | f1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch) | |
tree | c2c130a74be25b0b2dff992e1a195e2728bdaadd /arch/blackfin/lib/strcpy.S | |
parent | fd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'arch/blackfin/lib/strcpy.S')
-rw-r--r-- | arch/blackfin/lib/strcpy.S | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/blackfin/lib/strcpy.S b/arch/blackfin/lib/strcpy.S new file mode 100644 index 000000000000..a6a0c6363806 --- /dev/null +++ b/arch/blackfin/lib/strcpy.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright 2005-2010 Analog Devices Inc. | ||
3 | * | ||
4 | * Licensed under the ADI BSD license or the GPL-2 (or later) | ||
5 | */ | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | |||
9 | /* void *strcpy(char *dest, const char *src); | ||
10 | * R0 = address (dest) | ||
11 | * R1 = address (src) | ||
12 | * | ||
13 | * Returns a pointer to the destination string dest | ||
14 | */ | ||
15 | |||
16 | #ifdef CONFIG_STRCPY_L1 | ||
17 | .section .l1.text | ||
18 | #else | ||
19 | .text | ||
20 | #endif | ||
21 | |||
22 | .align 2 | ||
23 | |||
24 | ENTRY(_strcpy) | ||
25 | P0 = R0 ; /* dst*/ | ||
26 | P1 = R1 ; /* src*/ | ||
27 | |||
28 | 1: | ||
29 | R1 = B [P1++] (Z); | ||
30 | B [P0++] = R1; | ||
31 | CC = R1; | ||
32 | if cc jump 1b (bp); | ||
33 | RTS; | ||
34 | |||
35 | ENDPROC(_strcpy) | ||