File:  [DVB] / dietlibc / x86_64 / strchr.S
Revision 1.3: download - view: text, annotated - select for diffs
Mon Jan 25 19:04:49 2016 UTC (8 years, 4 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
  plumbing to get preliminary PIE support for x86_64

.text
.type   strchr,@function
.global strchr
.weak index
#ifdef __PIE__
.hidden strchr
.hidden index
#endif
.type index,@function

index:
strchr:
	xchg	%rsi,%rdi
.Lloop:
	lodsb
	cmp	%al,%dil
	jz .Lfound
	or	%al,%al
	jnz .Lloop
	xor	%eax,%eax
	ret
.Lfound:
	lea	-1(%rsi),%rax
	ret
.Lhere:
.size strchr,.Lhere-strchr
	.section	.note.GNU-stack,"",@progbits

LinuxTV legacy CVS <linuxtv.org/cvs>