patch-2.1.30 linux/arch/sparc64/lib/memcmp.S
Next file: linux/arch/sparc64/lib/memcpy.S
Previous file: linux/arch/sparc64/lib/locks.S
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Thu Mar 20 16:43:32 1997
- Orig file:
v2.1.29/linux/arch/sparc64/lib/memcmp.S
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.1.29/linux/arch/sparc64/lib/memcmp.S linux/arch/sparc64/lib/memcmp.S
@@ -0,0 +1,29 @@
+/* $Id: memcmp.S,v 1.1 1997/03/14 21:04:23 jj Exp $
+ * Sparc64 optimized memcmp code.
+ *
+ * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+ */
+
+ .text
+ .align 4
+ .globl __memcmp, memcmp
+__memcmp:
+memcmp:
+ brlez,pn %o2, 2f
+ sub %g0, %o2, %o3
+ add %o0, %o2, %o0
+ add %o1, %o2, %o1
+ ldub [%o0 + %o3], %o4
+1:
+ ldub [%o1 + %o3], %o5
+ sub %o4, %o5, %o4
+ brnz,pn %o4, 3f
+ addcc %o3, 1, %o3
+ bne,a,pt %xcc, 1b
+ ldub [%o0 + %o3], %o5
+2:
+ retl
+ clr %o0
+3:
+ retl
+ mov %o4, %o0
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov