repo.or.cz
/
linux-2.6
/
mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
kobject: add sample code for how to use kobjects in a simple manner.
[linux-2.6/mini2440.git]
/
arch
/
sh
/
lib
/
memchr.S
blob
bc6036ad5706022bb19ff8149d6233ee6ada56e0
1
/* $Id: memchr.S,v 1.1 2000/04/14 16:49:01 mjd Exp $
2
*
3
* "memchr" implementation of SuperH
4
*
5
* Copyright (C) 1999 Niibe Yutaka
6
*
7
*/
8
9
/*
10
* void *memchr(const void *s, int c, size_t n);
11
*/
12
13
#include <linux/linkage.h>
14
ENTRY(memchr)
15
tst r6,r6
16
bt/s 2f
17
exts.b r5,r5
18
1: mov.b @r4,r1
19
cmp/eq r1,r5
20
bt/s 3f
21
dt r6
22
bf/s 1b
23
add #1,r4
24
2: mov #0,r4
25
3: rts
26
mov r4,r0