aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_strlen.S
diff options
context:
space:
mode:
authorJozanLeClerc <JozanLeClerc@noemail.net>2020-11-20 18:31:08 +0000
committerJozanLeClerc <JozanLeClerc@noemail.net>2020-11-20 18:31:08 +0000
commitc16e1a7f76d46c169f4063cfb056e6a7bb295437 (patch)
treeffbaae69f0e064760f94f5dcf0d7da5c0d7c1d75 /src/u_strlen.S
parentIn progress (diff)
downloadbsdsetsid-c16e1a7f76d46c169f4063cfb056e6a7bb295437.tar.gz
bsdsetsid-c16e1a7f76d46c169f4063cfb056e6a7bb295437.tar.bz2
bsdsetsid-c16e1a7f76d46c169f4063cfb056e6a7bb295437.tar.xz
bsdsetsid-c16e1a7f76d46c169f4063cfb056e6a7bb295437.tar.zst
bsdsetsid-c16e1a7f76d46c169f4063cfb056e6a7bb295437.zip
For some reason it's bad
FossilOrigin-Name: 36252a8a5d81a5daaa6491ddd28f195d4558c3c7
Diffstat (limited to 'src/u_strlen.S')
-rw-r--r--src/u_strlen.S12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/u_strlen.S b/src/u_strlen.S
index fb783ab..aaa6c02 100644
--- a/src/u_strlen.S
+++ b/src/u_strlen.S
@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* bsdsetsid: src/u_strlen.S
- * 2020-11-19 14:10
+ * 2020-11-20 19:25
* Joe
*
* Simple implementation of strlen.
@@ -50,14 +50,12 @@
u_strlen:
mov %rdi, %rcx
-
-u_loop:
+.u.loop:
cmpb $0x0, (%rcx)
- je u_ret
+ je .u.ret
inc %rcx
- jmp u_loop
-
-u_ret:
+ jmp .u.loop
+.u.ret:
sub %rdi, %rcx
mov %rcx, %rax
ret