1 /* 2 * Copyright (c) 1984 Regents of the University of California. 3 * All rights reserved. The Berkeley software License Agreement 4 * specifies the terms and conditions for redistribution. 5 */ 6 7 #ifndef lint 8 static char sccsid[] = "@(#)libcpats.c 1.3 (Berkeley) 06/08/85"; 9 #endif not lint 10 11 #include "inline.h" 12 13 /* 14 * Pattern table for the C library. 15 */ 16 struct pats libc_ptab[] = { 17 18 #ifdef vax 19 { "1,_fgetc\n", 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 29 { "2,_fputc\n", 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" }, 38 39 { "1,_strlen\n", 40 " movl (sp)+,r5\n\ 41 movl r5,r1\n\ 42 1:\n\ 43 locc $0,$65535,(r1)\n\ 44 jeql 1b\n\ 45 subl3 r5,r1,r0\n" }, 46 #endif vax 47 48 #ifdef mc68000 49 /* someday... */ 50 #endif mc68000 51 52 { "", "" } 53 }; 54