mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-27 12:15:39 +03:00
Shorten x86-64 strlen a bit.
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
/* strlen(str) -- determine the length of the string STR.
|
/* strlen(str) -- determine the length of the string STR.
|
||||||
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
Copyright (C) 2009, 2010 Free Software Foundation, Inc.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>.
|
Contributed by Ulrich Drepper <drepper@redhat.com>.
|
||||||
Modified by Intel Corporation.
|
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@@ -85,22 +84,19 @@ L(exit_less16):
|
|||||||
L(exit16):
|
L(exit16):
|
||||||
sub %rdi, %rax
|
sub %rdi, %rax
|
||||||
bsf %rdx, %rdx
|
bsf %rdx, %rdx
|
||||||
add %rdx, %rax
|
lea 16(%rdx), %rax
|
||||||
add $16, %rax
|
|
||||||
ret
|
ret
|
||||||
.p2align 4
|
.p2align 4
|
||||||
L(exit32):
|
L(exit32):
|
||||||
sub %rdi, %rax
|
sub %rdi, %rax
|
||||||
bsf %rdx, %rdx
|
bsf %rdx, %rdx
|
||||||
add %rdx, %rax
|
lea 32(%rdx), %rax
|
||||||
add $32, %rax
|
|
||||||
ret
|
ret
|
||||||
.p2align 4
|
.p2align 4
|
||||||
L(exit48):
|
L(exit48):
|
||||||
sub %rdi, %rax
|
sub %rdi, %rax
|
||||||
bsf %rdx, %rdx
|
bsf %rdx, %rdx
|
||||||
add %rdx, %rax
|
lea 48(%rdx), %rax
|
||||||
add $48, %rax
|
|
||||||
ret
|
ret
|
||||||
END(strlen)
|
END(strlen)
|
||||||
libc_hidden_builtin_def (strlen)
|
libc_hidden_builtin_def (strlen)
|
||||||
|
|||||||
Reference in New Issue
Block a user