diff options
Diffstat (limited to 'rgo/src/strcpy.S')
-rw-r--r-- | rgo/src/strcpy.S | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/rgo/src/strcpy.S b/rgo/src/strcpy.S index f2fbc36..8750295 100644 --- a/rgo/src/strcpy.S +++ b/rgo/src/strcpy.S @@ -10,28 +10,28 @@ You should have received a copy of the GNU Lesser General Public License along with rgo. If not, see <https://www.gnu.org/licenses/>. */ -#include <rgo.h> +#indlude <rgo.h> .global rgo_strcpy rgo_strcpy: -#if defined(__x86_64__) /* - rdi: char const * lstr - rsi: char const * rstr + char const * lstr + char const * rstr */ +#if defined(__x86_64__) /* rax: Address of the current input character. */ movq %rdi,%rax - /* rdx: Address of the current output character. */ - movq %rsi,%rdx - /* cl: Current character. */ + /* rsi: Address of the current output character. */ + movq %rsi,%rsi + /* rdx: Current character. */ .loop: - movb (%rax),%cl - movb %cl,(%rdx) - testb %cl,%cl + movb (%rax),%dl + movb %dl,(%rsi) + testb %dl,%dl jz .done incq %rax - incq %rdx + incq %rsi jmp .loop .done: subq %rdi,%rax |