summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/string.h
diff options
context:
space:
mode:
authorGleb O. Raiko <raiko@niisi.msk.ru>2000-02-28 14:34:47 +0000
committerGleb O. Raiko <raiko@niisi.msk.ru>2000-02-28 14:34:47 +0000
commitad194fc92f55240d1670f7fc9bf1c3afc2c3b525 (patch)
tree0d23d32653385618da6a44cf14a12056c11cdbb7 /include/asm-mips/string.h
parentb98f565d636da0d4ae873c42c218ae61c0a833e1 (diff)
move nop out of the loop in strncmp.
It saves an instruction per loop, nothing more.
Diffstat (limited to 'include/asm-mips/string.h')
-rw-r--r--include/asm-mips/string.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h
index d42e8e360..e19a50fbb 100644
--- a/include/asm-mips/string.h
+++ b/include/asm-mips/string.h
@@ -1,4 +1,4 @@
-/* $Id: string.h,v 1.12 2000/02/16 01:07:48 ralf Exp $
+/* $Id: string.h,v 1.13 2000/02/19 14:12:14 harald Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -100,20 +100,18 @@ strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count)
".set\tnoreorder\n\t"
".set\tnoat\n"
"1:\tlbu\t%3,(%0)\n\t"
-#if defined(CONFIG_CPU_R3000)
- "lbu\t$1,(%1)\n\t"
- "nop\n\t"
- "beqz\t%2,2f\n\t"
-#else
"beqz\t%2,2f\n\t"
"lbu\t$1,(%1)\n\t"
-#endif
"subu\t%2,1\n\t"
"bne\t$1,%3,3f\n\t"
"addiu\t%0,1\n\t"
"bnez\t%3,1b\n\t"
"addiu\t%1,1\n"
- "2:\tmove\t%3,$1\n"
+ "2:\n\t"
+#if defined(CONFIG_CPU_R3000)
+ "nop\n\t"
+#endif
+ "move\t%3,$1\n"
"3:\tsubu\t%3,$1\n\t"
".set\tat\n\t"
".set\treorder"