xref: /original-bsd/usr.bin/f77/libF77/CCI/hl_ge_s.s (revision 28e93ce0)
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Computer Consoles Inc.
7 *
8 * %sccs.include.proprietary.c%
9 */
10
11#ifndef lint
12	.asciz "@(#)hl_ge_s.s	5.2 (Berkeley) 04/12/91"
13#endif /* not lint */
14
15.data
16.text
17LL0:.align	1
18.globl	_hl_ge
19.set	MASK__, 0x4
20.data
21.text
22_hl_ge:.word	MASK__
23	movl	4(fp),r0		/* a */
24	movl	8(fp),r1		/* b */
25	cmpl	12(fp),16(fp)		/* if (la <= lb) */
26	jgtr	LB
27	movl	12(fp), r2		/* compare according to la */
28	cmps3
29	jlss	out0			/* if less return(0) */
30	jgtr	out1			/* if greater return(1) */
31
32	cmpl	12(fp),16(fp)		/* if (la == lb) */
33	jeql	out1			/* then equal */
34
35	addl3	8(fp), 16(fp), r2	/* bend */
36LOOP1:
37	cmpb	(r1), $32		/* if *b != space */
38	jneq	out0			/* then astring < bstring */
39	incl	r1			/* else continue */
40	cmpl	r1, r2			/* till bend */
41	jlssu	LOOP1
42	jbr	out1
43
44LB:					/* else */
45	movl	16(fp), r2		/* compare according to lb */
46	cmps3
47	jlss	out0			/* if less return(0) */
48
49out1:
50	movl	$1, r0
51	ret
52out0:
53	clrl	r0
54	ret
55