aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/lib/memchr.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sh/lib/memchr.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/sh/lib/memchr.S')
-rw-r--r--arch/sh/lib/memchr.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/sh/lib/memchr.S b/arch/sh/lib/memchr.S
new file mode 100644
index 000000000000..bc6036ad5706
--- /dev/null
+++ b/arch/sh/lib/memchr.S
@@ -0,0 +1,26 @@
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>
14ENTRY(memchr)
15 tst r6,r6
16 bt/s 2f
17 exts.b r5,r5
181: mov.b @r4,r1
19 cmp/eq r1,r5
20 bt/s 3f
21 dt r6
22 bf/s 1b
23 add #1,r4
242: mov #0,r4
253: rts
26 mov r4,r0