non-AT&T implementations of frexp.c in machine/gen/frexp.c
[unix-history] / usr / src / lib / libc / tahoe / string / strcmp.s
CommitLineData
f15e832d
KB
1/*
2 * Copyright (c) 1988 Regents of the University of California.
3 * All rights reserved.
4 *
019bea33 5 * %sccs.include.redist.c%
4afb9d15 6 *
f15e832d
KB
7 * This code is derived from software contributed to Berkeley by
8 * Computer Consoles Inc.
f15e832d
KB
9 */
10
11#if defined(LIBC_SCCS) && !defined(lint)
019bea33 12 .asciz "@(#)strcmp.s 1.4 (Berkeley) %G%"
f15e832d 13#endif /* LIBC_SCCS and not lint */
4aefe829
SL
14
15#include "DEFS.h"
16
17/*
18 * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
19 *
20 * strcmp(s1, s2)
21 * register char *s1, *s2;
22*/
23
24ENTRY(strcmp, 0)
25 movl 4(fp),r0
26 movl 8(fp),r1
27 cmps2
28 jgtr greater
29 jlss less
30equal: clrl r0
31 ret
32less: movl $-1,r0
33 ret
34greater: movl $1,r0
35 ret