Commit | Line | Data |
---|---|---|
da7c5cc6 | 1 | /* |
0880b18e | 2 | * Copyright (c) 1984, 1986 Regents of the University of California. |
da7c5cc6 KM |
3 | * All rights reserved. The Berkeley software License Agreement |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
f69579ab KM |
6 | |
7 | #ifndef lint | |
0880b18e | 8 | static char sccsid[] = "@(#)libcpats.c 7.1 (Berkeley) %G%"; |
f69579ab KM |
9 | #endif not lint |
10 | ||
ea1f375a | 11 | #include "inline.h" |
f69579ab KM |
12 | |
13 | /* | |
14 | * Pattern table for the C library. | |
15 | */ | |
16 | struct pats libc_ptab[] = { | |
17 | ||
18 | #ifdef vax | |
c8869d53 | 19 | { 1, "_fgetc\n", |
f69579ab KM |
20 | " sobgeq *(sp),1f\n\ |
21 | calls $1,__filbuf\n\ | |
22 | jbr 2f\n\ | |
23 | 1:\n\ | |
24 | addl3 $4,(sp)+,r1\n\ | |
25 | movzbl *(r1),r0\n\ | |
26 | incl (r1)\n\ | |
27 | 2:\n" }, | |
28 | ||
c8869d53 | 29 | { 2, "_fputc\n", |
f69579ab KM |
30 | " sobgeq *4(sp),1f\n\ |
31 | calls $2,__flsbuf\n\ | |
32 | jbr 2f\n\ | |
33 | 1:\n\ | |
34 | movq (sp)+,r0\n\ | |
35 | movb r0,*4(r1)\n\ | |
36 | incl 4(r1)\n\ | |
37 | 2:\n" }, | |
7a971c52 MK |
38 | #endif vax |
39 | ||
40 | #ifdef mc68000 | |
41 | /* someday... */ | |
42 | #endif mc68000 | |
43 | ||
44 | { 0, "", "" } | |
45 | }; | |
46 | ||
47 | struct pats vaxsubset_libc_ptab[] = { | |
48 | ||
49 | { 1, "_strlen\n", | |
50 | " movl (sp)+,r5\n\ | |
51 | movl r5,r1\n\ | |
52 | 1:\n\ | |
53 | tstb (r1)+\n\ | |
54 | jneq 1b\n\ | |
55 | decl r1\n\ | |
56 | subl3 r5,r1,r0\n" }, | |
57 | ||
58 | { 0, "", "" } | |
59 | }; | |
60 | ||
61 | struct pats vax_libc_ptab[] = { | |
f69579ab | 62 | |
c8869d53 | 63 | { 1, "_strlen\n", |
f69579ab KM |
64 | " movl (sp)+,r5\n\ |
65 | movl r5,r1\n\ | |
66 | 1:\n\ | |
67 | locc $0,$65535,(r1)\n\ | |
68 | jeql 1b\n\ | |
69 | subl3 r5,r1,r0\n" }, | |
f69579ab | 70 | |
c8869d53 | 71 | { 0, "", "" } |
f69579ab | 72 | }; |