Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | * arch/alpha/lib/strcpy.S |
| 4 | * Contributed by Richard Henderson (rth@tamu.edu) |
| 5 | * |
| 6 | * Copy a null-terminated string from SRC to DST. Return a pointer |
| 7 | * to the null-terminator in the source. |
| 8 | */ |
Al Viro | 00fc0e0 | 2016-01-11 09:51:29 -0500 | [diff] [blame] | 9 | #include <asm/export.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | .text |
| 11 | |
| 12 | .align 3 |
| 13 | .globl strcpy |
| 14 | .ent strcpy |
| 15 | strcpy: |
| 16 | .frame $30, 0, $26 |
| 17 | .prologue 0 |
| 18 | |
| 19 | mov $16, $0 # set up return value |
| 20 | mov $26, $23 # set up return address |
| 21 | unop |
| 22 | br __stxcpy # do the copy |
| 23 | |
| 24 | .end strcpy |
Al Viro | 00fc0e0 | 2016-01-11 09:51:29 -0500 | [diff] [blame] | 25 | EXPORT_SYMBOL(strcpy) |