xref: /csrg-svn/sys/vax/inline/libcpats.c (revision 16959)
1 /* Copyright (c) 1984 Regents of the University of California */
2 
3 #ifndef lint
4 static char sccsid[] = "@(#)libcpats.c	1.1	(Berkeley)	08/18/84";
5 #endif not lint
6 
7 #include "pc2.h"
8 
9 /*
10  * Pattern table for the C library.
11  */
12 struct pats libc_ptab[] = {
13 
14 #ifdef vax
15 	{ "1,_fgetc\n",
16 "	sobgeq	*(sp),1f\n\
17 	calls	$1,__filbuf\n\
18 	jbr     2f\n\
19 1:\n\
20 	addl3	$4,(sp)+,r1\n\
21 	movzbl	*(r1),r0\n\
22 	incl	(r1)\n\
23 2:\n" },
24 
25 	{ "2,_fputc\n",
26 "	sobgeq	*4(sp),1f\n\
27 	calls	$2,__flsbuf\n\
28 	jbr	2f\n\
29 1:\n\
30 	movq	(sp)+,r0\n\
31 	movb	r0,*4(r1)\n\
32 	incl	4(r1)\n\
33 2:\n" },
34 
35 	{ "1,_strlen\n",
36 "	movl	(sp)+,r5\n\
37 	movl	r5,r1\n\
38 1:\n\
39 	locc	$0,$65535,(r1)\n\
40 	jeql	1b\n\
41 	subl3	r5,r1,r0\n" },
42 #endif vax
43 
44 #ifdef mc68000
45 /* someday... */
46 #endif mc68000
47 
48 	{ "", "" }
49 };
50