xref: /kernel/linux/linux-5.10/arch/sh/lib/memchr.S
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/sh/lib/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* $Id: memchr.S,v 1.1 2000/04/14 16:49:01 mjd Exp $
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * "memchr" implementation of SuperH
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 1999  Niibe Yutaka
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/*
118c2ecf20Sopenharmony_ci * void *memchr(const void *s, int c, size_t n);
128c2ecf20Sopenharmony_ci */
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/linkage.h>
158c2ecf20Sopenharmony_ciENTRY(memchr)
168c2ecf20Sopenharmony_ci	tst	r6,r6
178c2ecf20Sopenharmony_ci	bt/s	2f
188c2ecf20Sopenharmony_ci	 exts.b	r5,r5
198c2ecf20Sopenharmony_ci1:	mov.b	@r4,r1
208c2ecf20Sopenharmony_ci	cmp/eq	r1,r5
218c2ecf20Sopenharmony_ci	bt/s	3f
228c2ecf20Sopenharmony_ci	 dt	r6
238c2ecf20Sopenharmony_ci	bf/s	1b
248c2ecf20Sopenharmony_ci	 add	#1,r4
258c2ecf20Sopenharmony_ci2:	mov	#0,r4
268c2ecf20Sopenharmony_ci3:	rts
278c2ecf20Sopenharmony_ci	 mov	r4,r0
28

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