xref: /kernel/linux/linux-5.10/arch/arm/lib/memchr.S
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/arm/lib/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  linux/arch/arm/lib/memchr.S
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *  Copyright (C) 1995-2000 Russell King
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *  ASM optimised string functions
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci#include <linux/linkage.h>
108c2ecf20Sopenharmony_ci#include <asm/assembler.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci	.text
138c2ecf20Sopenharmony_ci	.align	5
148c2ecf20Sopenharmony_ciENTRY(memchr)
158c2ecf20Sopenharmony_ci1:	subs	r2, r2, #1
168c2ecf20Sopenharmony_ci	bmi	2f
178c2ecf20Sopenharmony_ci	ldrb	r3, [r0], #1
188c2ecf20Sopenharmony_ci	teq	r3, r1
198c2ecf20Sopenharmony_ci	bne	1b
208c2ecf20Sopenharmony_ci	sub	r0, r0, #1
218c2ecf20Sopenharmony_ci2:	movne	r0, #0
228c2ecf20Sopenharmony_ci	ret	lr
238c2ecf20Sopenharmony_ciENDPROC(memchr)
24

Indexes created Thu Nov 07 10:32:03 CST 2024