new copyright; att/bsd/shared
[unix-history] / usr / src / sys / vax / inline / libcpats.c
CommitLineData
80992c50
KB
1/*-
2 * Copyright (c) 1984, 1986 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
da7c5cc6 6 */
f69579ab
KM
7
8#ifndef lint
80992c50
KB
9static char sccsid[] = "@(#)libcpats.c 7.2 (Berkeley) %G%";
10#endif /* not lint */
f69579ab 11
ea1f375a 12#include "inline.h"
f69579ab
KM
13
14/*
15 * Pattern table for the C library.
16 */
17struct pats libc_ptab[] = {
18
19#ifdef vax
c8869d53 20 { 1, "_fgetc\n",
f69579ab
KM
21" sobgeq *(sp),1f\n\
22 calls $1,__filbuf\n\
23 jbr 2f\n\
241:\n\
25 addl3 $4,(sp)+,r1\n\
26 movzbl *(r1),r0\n\
27 incl (r1)\n\
282:\n" },
29
c8869d53 30 { 2, "_fputc\n",
f69579ab
KM
31" sobgeq *4(sp),1f\n\
32 calls $2,__flsbuf\n\
33 jbr 2f\n\
341:\n\
35 movq (sp)+,r0\n\
36 movb r0,*4(r1)\n\
37 incl 4(r1)\n\
382:\n" },
7a971c52
MK
39#endif vax
40
41#ifdef mc68000
42/* someday... */
43#endif mc68000
44
45 { 0, "", "" }
46};
47
48struct pats vaxsubset_libc_ptab[] = {
49
50 { 1, "_strlen\n",
51" movl (sp)+,r5\n\
52 movl r5,r1\n\
531:\n\
54 tstb (r1)+\n\
55 jneq 1b\n\
56 decl r1\n\
57 subl3 r5,r1,r0\n" },
58
59 { 0, "", "" }
60};
61
62struct pats vax_libc_ptab[] = {
f69579ab 63
c8869d53 64 { 1, "_strlen\n",
f69579ab
KM
65" movl (sp)+,r5\n\
66 movl r5,r1\n\
671:\n\
68 locc $0,$65535,(r1)\n\
69 jeql 1b\n\
70 subl3 r5,r1,r0\n" },
f69579ab 71
c8869d53 72 { 0, "", "" }
f69579ab 73};