1: /* 2: * Copyright (c) 1984, 1986 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 7.1 (Berkeley) 6/5/86"; 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: #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[] = { 62: 63: { 1, "_strlen\n", 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" }, 70: 71: { 0, "", "" } 72: };