summaryrefslogtreecommitdiff
path: root/rgo/src/streq.S
diff options
context:
space:
mode:
Diffstat (limited to 'rgo/src/streq.S')
-rw-r--r--rgo/src/streq.S30
1 files changed, 15 insertions, 15 deletions
diff --git a/rgo/src/streq.S b/rgo/src/streq.S
index f530d54..8969e41 100644
--- a/rgo/src/streq.S
+++ b/rgo/src/streq.S
@@ -15,26 +15,26 @@
.global rgo_streq
rgo_streq:
-#if defined(__x86_64__)
/*
- rdi: char const * lstr
- rsi: char const * rstr
+ char const * lstr
+ char const * rstr
*/
- /* rdx: Address of the current input character. */
- movq %rdi,%rdx
- /* rcx: Address of the current output character. */
- movq %rsi,%rcx
- /* r8b: Current input character. */
- /* r9b: Current output character. */
+#if defined(__x86_64__)
+ /* rax: Address of the current input character. */
+ movq %rdi,%rax
+ /* rsi: Address of the current output character. */
+ movq %rsi,%rsi
+ /* rdx: Current input character. */
+ /* rcx: Current output character. */
.loop:
- movb (%rdx),%r8b
- movb (%rcx),%r9b
- cmpb %r8b,%r9b
+ movb (%rax),%dl
+ movb (%rsi),%cl
+ cmpb %dl,%cl
jne .neq
- testb %r8b,%r8b /* Check if we have reached the null-terminator. */
+ testb %dl,%dl /* Check if we have reached the null-terminator. */
jz .eq
- incq %rdx
- incq %rcx
+ incq %rax
+ incq %rsi
jmp .loop
.eq:
mov $0x1,%rax