summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/string.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-23 08:00:03 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-23 08:00:03 +0000
commitcc858f6e51f21ecda51f60b595eae308f032566c (patch)
treedef4de98a50fc06cc5a2c36dba8c5824c9717fab /include/asm-mips/string.h
parent6dd778f9528c1acc17dbfca685f51bd5c3750d45 (diff)
Store current in $28.
Diffstat (limited to 'include/asm-mips/string.h')
-rw-r--r--include/asm-mips/string.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h
index 39e6b445c..37de75952 100644
--- a/include/asm-mips/string.h
+++ b/include/asm-mips/string.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, 1995, 1996, 1997 by Ralf Baechle
*
- * $Id: string.h,v 1.4 1998/03/21 19:31:09 ralf Exp $
+ * $Id: string.h,v 1.5 1998/03/22 23:27:20 ralf Exp $
*/
#ifndef __ASM_MIPS_STRING_H
#define __ASM_MIPS_STRING_H
@@ -45,6 +45,14 @@ extern __inline__ char *strncpy(char *__dest, __const__ char *__src, size_t __n)
__asm__ __volatile__(
".set\tnoreorder\n\t"
".set\tnoat\n"
+1: beq %0,%1,2f
+ lb $1,(%1)
+ addiu %1,1
+ sb $1,(%0)
+ addiu %0,1
+
+
+
"1:\tlbu\t$1,(%1)\n\t"
"subu\t%2,1\n\t"
"sb\t$1,(%0)\n\t"