Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ |
2 | #include |
||
3 | |||
4 | char * strcpy(char *to, const char *from) |
||
5 | { |
||
6 | int d0, d1, d2; |
||
7 | __asm__ __volatile__( |
||
8 | "1:\tlodsb\n\t" |
||
9 | "stosb\n\t" |
||
10 | "testb %%al,%%al\n\t" |
||
11 | "jne 1b" |
||
12 | : "=&S" (d0), "=&D" (d1), "=&a" (d2) |
||
13 | :"0" (from),"1" (to) : "memory"); |
||
14 | return to; |
||
15 | } |