122272Sdist /* 222272Sdist * Copyright (c) 1979, 1984 Regents of the University of California 322272Sdist * All rights reserved. The Berkeley software License Agreement 422272Sdist * specifies the terms and conditions for redistribution. 522272Sdist */ 62086Smckusick 716964Smckusick #ifndef lint 8*30841Smckusick static char sccsid[] = "@(#)langpats.c 5.5 (Berkeley) 04/07/87"; 916964Smckusick #endif not lint 102086Smckusick 1116964Smckusick #include "inline.h" 1216964Smckusick 132086Smckusick /* 1416964Smckusick * Pattern table for Pascal library routines. 152086Smckusick */ 1616964Smckusick struct pats language_ptab[] = { 172086Smckusick 1811877Smckusick #ifdef vax 199141Smckusick /* 2016964Smckusick * General Pascal library routines 219141Smckusick */ 2224397Smckusick { 2, "_ROUND\n", 2316964Smckusick " movd (sp)+,r0\n\ 2416964Smckusick cvtrdl r0,r0\n" }, 252086Smckusick 2624397Smckusick { 2, "_TRUNC\n", 2716964Smckusick " movd (sp)+,r0\n\ 2816964Smckusick cvtdl r0,r0\n" }, 292086Smckusick 3024397Smckusick { 1, "_ACTFILE\n", 319141Smckusick " movl (sp)+,r1\n\ 329141Smckusick movl 12(r1),r0\n" }, 339141Smckusick 3424397Smckusick { 2, "_FCALL\n", 3516964Smckusick " movl (sp)+,r5\n\ 3616964Smckusick movl (sp),r0\n\ 3716964Smckusick movc3 4(r0),__disply+8,(r5)\n\ 383437Smckusic movl (sp)+,r0\n\ 394015Smckusic movc3 4(r0),8(r0),__disply+8\n" }, 402086Smckusick 4124397Smckusick { 2, "_FRTN\n", 423437Smckusic " movl (sp)+,r0\n\ 4316964Smckusick movl (sp)+,r5\n\ 4416964Smckusick movc3 4(r0),(r5),__disply+8\n" }, 452086Smckusick 4624397Smckusick { 3, "_FSAV\n", 4716964Smckusick " movl (sp)+,r3\n\ 4816964Smckusick movl (sp)+,r4\n\ 4916964Smckusick movl (sp),r5\n\ 5016964Smckusick movl r3,(r5)\n\ 5116964Smckusick ashl $3,r4,4(r5)\n\ 5216964Smckusick movc3 4(r5),__disply+8,8(r5)\n\ 534015Smckusic movl (sp)+,r0\n" }, 542086Smckusick 559141Smckusick /* 569141Smckusick * Pascal relational comparisons 579141Smckusick */ 5824397Smckusick { 3, "_RELEQ\n", 5916964Smckusick " movl (sp)+,r0\n\ 6016964Smckusick movl (sp)+,r1\n\ 6116964Smckusick movl (sp)+,r3\n\ 624015Smckusic movl r0,r4\n\ 632102Smckusic 1:\n\ 642102Smckusic movzwl $65535,r0\n\ 652102Smckusic cmpl r4,r0\n\ 662195Smckusic jleq 3f\n\ 672102Smckusic subl2 r0,r4\n\ 682102Smckusic cmpc3 r0,(r1),(r3)\n\ 692102Smckusic jeql 1b\n\ 702102Smckusic 2:\n\ 712195Smckusic clrl r0\n\ 722195Smckusic jbr 4f\n\ 732195Smckusic 3:\n\ 742102Smckusic cmpc3 r4,(r1),(r3)\n\ 752195Smckusic jneq 2b\n\ 762102Smckusic incl r0\n\ 772102Smckusic 4:\n" }, 782086Smckusick 7924397Smckusick { 3, "_RELNE\n", 8016964Smckusick " movl (sp)+,r0\n\ 8116964Smckusick movl (sp)+,r1\n\ 8216964Smckusick movl (sp)+,r3\n\ 834015Smckusic movl r0,r4\n\ 842086Smckusick 1:\n\ 852102Smckusic movzwl $65535,r0\n\ 862102Smckusic cmpl r4,r0\n\ 872195Smckusic jleq 3f\n\ 882102Smckusic subl2 r0,r4\n\ 892102Smckusic cmpc3 r0,(r1),(r3)\n\ 902102Smckusic jeql 1b\n\ 912102Smckusic 2:\n\ 922195Smckusic movl $1,r0\n\ 932195Smckusic jbr 4f\n\ 942195Smckusic 3:\n\ 952102Smckusic cmpc3 r4,(r1),(r3)\n\ 962195Smckusic jneq 2b\n\ 972102Smckusic 4:\n" }, 982086Smckusick 9924397Smckusick { 3, "_RELSLT\n", 10016964Smckusick " movl (sp)+,r0\n\ 10116964Smckusick movl (sp)+,r1\n\ 10216964Smckusick movl (sp)+,r3\n\ 1034015Smckusic movl r0,r4\n\ 1042195Smckusic jbr 2f\n\ 1052102Smckusic 1:\n\ 1062102Smckusic subl2 r0,r4\n\ 1072102Smckusic cmpc3 r0,(r1),(r3)\n\ 1082195Smckusic jneq 3f\n\ 1092102Smckusic 2:\n\ 1102195Smckusic movzwl $65535,r0\n\ 1112195Smckusic cmpl r4,r0\n\ 1122195Smckusic jgtr 1b\n\ 1132102Smckusic cmpc3 r4,(r1),(r3)\n\ 1142102Smckusic 3:\n\ 1152102Smckusic jlss 4f\n\ 1162086Smckusick clrl r0\n\ 1172102Smckusic jbr 5f\n\ 1182102Smckusic 4:\n\ 1192086Smckusick movl $1,r0\n\ 1202102Smckusic 5:\n" }, 1212086Smckusick 12224397Smckusick { 3, "_RELSLE\n", 12316964Smckusick " movl (sp)+,r0\n\ 12416964Smckusick movl (sp)+,r1\n\ 12516964Smckusick movl (sp)+,r3\n\ 1264015Smckusic movl r0,r4\n\ 1272195Smckusic jbr 2f\n\ 1282102Smckusic 1:\n\ 1292102Smckusic subl2 r0,r4\n\ 1302102Smckusic cmpc3 r0,(r1),(r3)\n\ 1312195Smckusic jneq 3f\n\ 1322102Smckusic 2:\n\ 1332195Smckusic movzwl $65535,r0\n\ 1342195Smckusic cmpl r4,r0\n\ 1352195Smckusic jgtr 1b\n\ 1362102Smckusic cmpc3 r4,(r1),(r3)\n\ 1372102Smckusic 3:\n\ 1382102Smckusic jleq 4f\n\ 1392086Smckusick clrl r0\n\ 1402102Smckusic jbr 5f\n\ 1412102Smckusic 4:\n\ 1422086Smckusick movl $1,r0\n\ 1432102Smckusic 5:\n" }, 1442086Smckusick 14524397Smckusick { 3, "_RELSGT\n", 14616964Smckusick " movl (sp)+,r0\n\ 14716964Smckusick movl (sp)+,r1\n\ 14816964Smckusick movl (sp)+,r3\n\ 1494015Smckusic movl r0,r4\n\ 1502195Smckusic jbr 2f\n\ 1512102Smckusic 1:\n\ 1522102Smckusic subl2 r0,r4\n\ 1532102Smckusic cmpc3 r0,(r1),(r3)\n\ 1542195Smckusic jneq 3f\n\ 1552102Smckusic 2:\n\ 1562195Smckusic movzwl $65535,r0\n\ 1572195Smckusic cmpl r4,r0\n\ 1582195Smckusic jgtr 1b\n\ 1592102Smckusic cmpc3 r4,(r1),(r3)\n\ 1602102Smckusic 3:\n\ 1612102Smckusic jgtr 4f\n\ 1622086Smckusick clrl r0\n\ 1632102Smckusic jbr 5f\n\ 1642102Smckusic 4:\n\ 1652086Smckusick movl $1,r0\n\ 1662102Smckusic 5:\n" }, 1672086Smckusick 16824397Smckusick { 3, "_RELSGE\n", 16916964Smckusick " movl (sp)+,r0\n\ 17016964Smckusick movl (sp)+,r1\n\ 17116964Smckusick movl (sp)+,r3\n\ 1724015Smckusic movl r0,r4\n\ 1732195Smckusic jbr 2f\n\ 1742102Smckusic 1:\n\ 1752102Smckusic subl2 r0,r4\n\ 1762102Smckusic cmpc3 r0,(r1),(r3)\n\ 1772195Smckusic jneq 3f\n\ 1782102Smckusic 2:\n\ 1792195Smckusic movzwl $65535,r0\n\ 1802195Smckusic cmpl r4,r0\n\ 1812195Smckusic jgtr 1b\n\ 1822102Smckusic cmpc3 r4,(r1),(r3)\n\ 1832102Smckusic 3:\n\ 1842102Smckusic jgeq 4f\n\ 1852086Smckusick clrl r0\n\ 1862102Smckusic jbr 5f\n\ 1872102Smckusic 4:\n\ 1882086Smckusick movl $1,r0\n\ 1892102Smckusic 5:\n" }, 1902086Smckusick 1919141Smckusick /* 1929141Smckusick * Pascal set operations. 1939141Smckusick */ 19424397Smckusick { 4, "_ADDT\n", 19516964Smckusick " movl (sp)+,r0\n\ 19616964Smckusick movl (sp)+,r1\n\ 19716964Smckusick movl (sp)+,r2\n\ 19816964Smckusick movl (sp)+,r4\n\ 1992086Smckusick movl r0,r3\n\ 2002086Smckusick 1:\n\ 2012086Smckusick bisl3 (r1)+,(r2)+,(r3)+\n\ 2022086Smckusick sobgtr r4,1b\n" }, 2032086Smckusick 20424397Smckusick { 4, "_SUBT\n", 20516964Smckusick " movl (sp)+,r0\n\ 20616964Smckusick movl (sp)+,r1\n\ 20716964Smckusick movl (sp)+,r2\n\ 20816964Smckusick movl (sp)+,r4\n\ 2092086Smckusick movl r0,r3\n\ 2102086Smckusick 1:\n\ 2112086Smckusick bicl3 (r2)+,(r1)+,(r3)+\n\ 2122086Smckusick sobgtr r4,1b\n" }, 2132086Smckusick 21424397Smckusick { 4, "_MULT\n", 21516964Smckusick " movl (sp)+,r0\n\ 21616964Smckusick movl (sp)+,r1\n\ 21716964Smckusick movl (sp)+,r2\n\ 21816964Smckusick movl (sp)+,r4\n\ 2192086Smckusick movl r0,r3\n\ 2202086Smckusick 1:\n\ 2212086Smckusick mcoml (r1)+,r5\n\ 2222086Smckusick bicl3 r5,(r2)+,(r3)+\n\ 2232086Smckusick sobgtr r4,1b\n" }, 2242086Smckusick 22524397Smckusick { 4, "_IN\n", 22616964Smckusick " movl (sp)+,r1\n\ 22716964Smckusick movl (sp)+,r2\n\ 22816964Smckusick movl (sp)+,r3\n\ 22916964Smckusick movl (sp)+,r4\n\ 2302230Smckusic clrl r0\n\ 2312195Smckusic subl2 r2,r1\n\ 2322195Smckusic cmpl r1,r3\n\ 2332102Smckusic jgtru 1f\n\ 2342195Smckusic jbc r1,(r4),1f\n\ 2352195Smckusic incl r0\n\ 2369141Smckusick 1:\n" }, 2379141Smckusick 2389141Smckusick /* 2399141Smckusick * Pascal runtime checks 2409141Smckusick */ 24124397Smckusick { 1, "_ASRT\n", 24216964Smckusick " movl (sp)+,r0\n\ 24316964Smckusick tstl r0\n\ 2449141Smckusick jneq 1f\n\ 2459141Smckusick pushl $0\n\ 2469141Smckusick pushl $_EASRT\n\ 2479141Smckusick calls $2,_ERROR\n\ 2489141Smckusick 1:\n" }, 2499141Smckusick 25024397Smckusick { 2, "_ASRTS\n", 25116964Smckusick " movl (sp)+,r0\n\ 25216964Smckusick movl (sp)+,r1\n\ 2539141Smckusick tstl r0\n\ 2549141Smckusick jneq 1f\n\ 2559141Smckusick pushl r1\n\ 2569141Smckusick pushl $_EASRTS\n\ 2579141Smckusick calls $2,_ERROR\n\ 2589141Smckusick 1:\n" }, 2599141Smckusick 26024397Smckusick { 1, "_CHR\n", 2619141Smckusick " movl (sp)+,r0\n\ 2629141Smckusick cmpl r0,$127\n\ 2639141Smckusick jlequ 1f\n\ 2649141Smckusick pushl r0\n\ 2659141Smckusick pushl $_ECHR\n\ 2669141Smckusick calls $2,_ERROR\n\ 2679141Smckusick 1:\n" }, 2689141Smckusick 26924397Smckusick { 0, "_LINO\n", 2709141Smckusick " incl __stcnt\n\ 2719141Smckusick cmpl __stcnt,__stlim\n\ 2729141Smckusick jlss 1f\n\ 2739141Smckusick pushl __stcnt\n\ 2749141Smckusick pushl $_ELINO\n\ 2759141Smckusick calls $2,_ERROR\n\ 2769141Smckusick 1:\n" }, 2779141Smckusick 27824397Smckusick { 1, "_NIL\n", 2799141Smckusick " movl (sp)+,r0\n\ 2809141Smckusick cmpl r0,__maxptr\n\ 2819141Smckusick jgtr 1f\n\ 2829141Smckusick cmpl r0,__minptr\n\ 2839141Smckusick jgeq 2f\n\ 2849141Smckusick 1:\n\ 2859141Smckusick pushl $0\n\ 2869141Smckusick pushl $_ENIL\n\ 2879141Smckusick calls $2,_ERROR\n\ 2889141Smckusick 2:\n" }, 2899141Smckusick 29024397Smckusick { 2, "_RANDOM\n", 29116964Smckusick " movd (sp)+,r0\n\ 2929141Smckusick emul __seed,$1103515245,$0,r0\n\ 2939141Smckusick ediv $0x7fffffff,r0,r1,r0\n\ 2949141Smckusick movl r0,__seed\n\ 2959141Smckusick cvtld r0,r0\n\ 2969141Smckusick divd2 $0d2.147483647e+09,r0\n" }, 2979141Smckusick 29824397Smckusick { 3, "_RANG4\n", 29916964Smckusick " movl (sp)+,r0\n\ 30016964Smckusick movl (sp)+,r1\n\ 30116964Smckusick movl (sp)+,r2\n\ 3029141Smckusick cmpl r0,r1\n\ 3039141Smckusick jlss 1f\n\ 3049141Smckusick cmpl r0,r2\n\ 3059141Smckusick jleq 2f\n\ 3069141Smckusick 1:\n\ 3079141Smckusick pushl r0\n\ 3089141Smckusick pushl $_ERANG\n\ 3099141Smckusick calls $2,_ERROR\n\ 3109141Smckusick 2:\n" }, 3119141Smckusick 31224397Smckusick { 2, "_RSNG4\n", 31316964Smckusick " movl (sp)+,r0\n\ 31416964Smckusick movl (sp)+,r1\n\ 3159141Smckusick cmpl r0,r1\n\ 3169141Smckusick jlequ 1f\n\ 3179141Smckusick pushl r0\n\ 3189141Smckusick pushl $_ERANG\n\ 3199141Smckusick calls $2,_ERROR\n\ 3209141Smckusick 1:\n" }, 3219141Smckusick 32224397Smckusick { 1, "_SEED\n", 32316964Smckusick " movl (sp)+,r1\n\ 32416964Smckusick movl __seed,r0\n\ 32516964Smckusick movl r1,__seed\n" }, 3269141Smckusick 32724397Smckusick { 3, "_SUBSC\n", 32816964Smckusick " movl (sp)+,r0\n\ 32916964Smckusick movl (sp)+,r1\n\ 33016964Smckusick movl (sp)+,r2\n\ 3319141Smckusick cmpl r0,r1\n\ 3329141Smckusick jlss 1f\n\ 3339141Smckusick cmpl r0,r2\n\ 3349141Smckusick jleq 2f\n\ 3359141Smckusick 1:\n\ 3369141Smckusick pushl r0\n\ 3379141Smckusick pushl $_ESUBSC\n\ 3389141Smckusick calls $2,_ERROR\n\ 3399141Smckusick 2:\n" }, 3409141Smckusick 34124397Smckusick { 2, "_SUBSCZ\n", 34216964Smckusick " movl (sp)+,r0\n\ 34316964Smckusick movl (sp)+,r1\n\ 3449141Smckusick cmpl r0,r1\n\ 3459141Smckusick jlequ 1f\n\ 3469141Smckusick pushl r0\n\ 3479141Smckusick pushl $_ESUBSC\n\ 3489141Smckusick calls $2,_ERROR\n\ 3499141Smckusick 1:\n" }, 35011877Smckusick #endif vax 3519141Smckusick 35211877Smckusick #ifdef mc68000 35312871Smckusick /* 35412871Smckusick * General Pascal library routines 35512871Smckusick */ 35624397Smckusick { 1, "_ACTFILE\n", 35717204Smckusick " movl sp@+,a0\n\ 35812871Smckusick movl a0@(12),d0\n" }, 35912871Smckusick 36024397Smckusick { 4, "_ADDT\n", 36117204Smckusick " movl sp@+,a0\n\ 36217204Smckusick movl sp@+,d0\n\ 36317204Smckusick movl sp@+,a1\n\ 36417204Smckusick movl sp@+,d1\n\ 36517204Smckusick movl a0,sp@-\n\ 36617204Smckusick movl a2,sp@-\n\ 36717204Smckusick movl d0,a2\n\ 36812871Smckusick subql #1,d1\n\ 36912871Smckusick 1:\n\ 37012871Smckusick movl a2@+,d0\n\ 37112871Smckusick orl a1@+,d0\n\ 37212871Smckusick movl d0,a0@+\n\ 37312871Smckusick dbra d1,1b\n\ 37412871Smckusick movl sp@+,a2\n\ 37517204Smckusick movl sp@+,d0\n" }, 37612871Smckusick 37724397Smckusick { 4, "_SUBT\n", 37817204Smckusick " movl sp@+,a0\n\ 37917204Smckusick movl sp@+,d0\n\ 38017204Smckusick movl sp@+,a1\n\ 38117204Smckusick movl sp@+,d1\n\ 38217204Smckusick movl a0,sp@-\n\ 38317204Smckusick movl a2,sp@-\n\ 38417204Smckusick movl d0,a2\n\ 38512871Smckusick subql #1,d1\n\ 38612871Smckusick 1:\n\ 38712871Smckusick movl a1@+,d0\n\ 38812871Smckusick notl d0\n\ 38912871Smckusick andl a2@+,d0\n\ 39012871Smckusick movl d0,a0@+\n\ 39112871Smckusick dbra d1,1b\n\ 39212871Smckusick movl sp@+,a2\n\ 39317204Smckusick movl sp@+,d0\n" }, 39412871Smckusick 39524397Smckusick { 4, "_MULT\n", 39617204Smckusick " movl sp@+,a0\n\ 39717204Smckusick movl sp@+,d0\n\ 39817204Smckusick movl sp@+,a1\n\ 39917204Smckusick movl sp@+,d1\n\ 40017204Smckusick movl a0,sp@-\n\ 40117204Smckusick movl a2,sp@-\n\ 40217204Smckusick movl d0,a2\n\ 40312871Smckusick subql #1,d1\n\ 40412871Smckusick 1:\n\ 40512871Smckusick movl a2@+,d0\n\ 40612871Smckusick andl a1@+,d0\n\ 40712871Smckusick movl d0,a0@+\n\ 40812871Smckusick dbra d1,1b\n\ 40912871Smckusick movl sp@+,a2\n\ 41017204Smckusick movl sp@+,d0\n" }, 41112871Smckusick 41224397Smckusick { 4, "_IN\n", 41317204Smckusick " movl sp@+,d0\n\ 41417204Smckusick movl sp@+,a0\n\ 41517204Smckusick movl sp@+,d1\n\ 41617204Smckusick movl sp@+,a1\n\ 41717204Smckusick subl a0,d0\n\ 41817204Smckusick cmpl d1,d0\n\ 41915124Speter jhi 1f\n\ 42017204Smckusick movl d0,d1\n\ 42117204Smckusick lsrl #3,d1\n\ 42217204Smckusick btst d0,a1@(0,d1:l)\n\ 42315124Speter jeq 1f\n\ 42412871Smckusick moveq #1,d0\n\ 42515124Speter jra 2f\n\ 42612871Smckusick 1:\n\ 42712871Smckusick moveq #0,d0\n\ 42812871Smckusick 2:\n" }, 42917204Smckusick 43024397Smckusick { 3, "_RANG4\n", 43117204Smckusick " movl sp@+,d0\n\ 43217204Smckusick movl sp@+,a0\n\ 43317204Smckusick movl sp@+,a1\n\ 43417204Smckusick cmpl a0,d0\n\ 43515840Saoki jlt 1f\n\ 43617204Smckusick cmpl a1,d0\n\ 43715840Saoki jle 2f\n\ 43815840Saoki 1:\n\ 43915840Saoki pea _ERANG\n\ 44015840Saoki jbsr _ERROR\n\ 44115840Saoki addqw #4,sp\n\ 44215840Saoki 2:\n" }, 44324397Smckusick { 2, "_RSNG4\n", 44417204Smckusick " movl sp@+,a0\n\ 44517204Smckusick movl sp@+,a1\n\ 44617204Smckusick cmpl a1,a0\n\ 44715840Saoki jls 1f\n\ 44815840Saoki pea _ERANG\n\ 44915840Saoki jbsr _ERROR\n\ 45015840Saoki addqw #4,sp\n\ 45115840Saoki 1:\n" }, 45217204Smckusick 45324397Smckusick { 3, "_SUBSC\n", 45417204Smckusick " movl sp@+,d0\n\ 45517204Smckusick movl sp@+,a0\n\ 45617204Smckusick movl sp@+,a1\n\ 45717204Smckusick cmpl a0,d0\n\ 45817204Smckusick jlt 1f\n\ 45917204Smckusick cmpl a1,d0\n\ 46017204Smckusick jle 2f\n\ 46117204Smckusick 1:\n\ 46217204Smckusick pea _ESUBSC\n\ 46317204Smckusick jbsr _ERROR\n\ 46417204Smckusick addqw #4,sp\n\ 46517204Smckusick 2:\n" }, 46617204Smckusick 46724397Smckusick { 2, "_SUBSCZ\n", 46817204Smckusick " movl sp@+,a0\n\ 46917204Smckusick movl sp@+,a1\n\ 47017204Smckusick cmpl a1,a0\n\ 47117204Smckusick jls 1f\n\ 47217204Smckusick pea _ESUBSC\n\ 47317204Smckusick jbsr _ERROR\n\ 47417204Smckusick addqw #4,sp\n\ 47517204Smckusick 1:\n" }, 47617204Smckusick 47711877Smckusick #endif mc68000 47811877Smckusick 47930061Smckusick #ifdef tahoe 48030061Smckusick { 2, "_TRUNC\n", 48130061Smckusick " ldd (sp)\n\ 48230061Smckusick movab 8(sp),sp\n\ 48330061Smckusick cvdl r0\n" }, 48430061Smckusick 48530061Smckusick { 1, "_ACTFILE\n", 48630061Smckusick " movl (sp)+,r1\n\ 48730061Smckusick movl 12(r1),r0\n" }, 48830061Smckusick 48930061Smckusick /* 49030061Smckusick * Pascal set operations. 49130061Smckusick */ 49230061Smckusick 49330061Smckusick { 4, "_ADDT\n", 49430061Smckusick " movl (sp)+,r0\n\ 49530061Smckusick movl (sp)+,r1\n\ 49630061Smckusick movl (sp)+,r2\n\ 497*30841Smckusick movl (sp)+,r3\n\ 498*30841Smckusick clrl r4\n\ 49930061Smckusick 1:\n\ 500*30841Smckusick orl3 (r1)[r4],(r2)[r4],(r0)[r4]\n\ 501*30841Smckusick aoblss r3,r4,1b\n" }, 50230061Smckusick 50330061Smckusick { 4, "_SUBT\n", 50430061Smckusick " movl (sp)+,r0\n\ 50530061Smckusick movl (sp)+,r1\n\ 50630061Smckusick movl (sp)+,r2\n\ 507*30841Smckusick movl (sp)+,r3\n\ 508*30841Smckusick decl r3\n\ 50930061Smckusick 1:\n\ 510*30841Smckusick mcoml (r2)[r3],r4\n\ 511*30841Smckusick andl3 r4,(r1)[r3],(r0)[r3]\n\ 512*30841Smckusick decl r3\n\ 513*30841Smckusick jgeq 1b\n" }, 51430061Smckusick 51530061Smckusick { 4, "_MULT\n", 51630061Smckusick " movl (sp)+,r0\n\ 51730061Smckusick movl (sp)+,r1\n\ 51830061Smckusick movl (sp)+,r2\n\ 519*30841Smckusick movl (sp)+,r3\n\ 520*30841Smckusick clrl r4\n\ 52130061Smckusick 1:\n\ 522*30841Smckusick andl3 (r1)[r4],(r2)[r4],(r0)[r4]\n\ 523*30841Smckusick aoblss r3,r4,1b\n" }, 52430061Smckusick 52530093Smckusick { 4, "_IN\n", 52630093Smckusick " movl (sp)+,r1\n\ 52730093Smckusick movl (sp)+,r2\n\ 52830093Smckusick movl (sp)+,r3\n\ 52930093Smckusick movl (sp)+,r4\n\ 53030093Smckusick clrl r0\n\ 53130093Smckusick subl2 r2,r1\n\ 53230093Smckusick cmpl r1,r3\n\ 53330093Smckusick jgtru 1f\n\ 53430093Smckusick shrl $3,r1,r2\n\ 53530093Smckusick movzbl (r4)[r2],r3\n\ 53630093Smckusick andl2 $7,r1\n\ 53730093Smckusick jbc r1,r3,1f\n\ 53830093Smckusick incl r0\n\ 53930093Smckusick 1:\n" }, 54030093Smckusick 54130061Smckusick /* 54230061Smckusick * Pascal runtime checks 54330061Smckusick */ 54430061Smckusick { 1, "_ASRT\n", 54530061Smckusick " movl (sp)+,r0\n\ 54630061Smckusick tstl r0\n\ 54730061Smckusick jneq 1f\n\ 54830061Smckusick pushl $0\n\ 54930061Smckusick pushl $_EASRT\n\ 55030061Smckusick callf $12,_ERROR\n\ 55130061Smckusick 1:\n" }, 55230061Smckusick 55330061Smckusick { 2, "_ASRTS\n", 55430061Smckusick " movl (sp)+,r0\n\ 55530061Smckusick movl (sp)+,r1\n\ 55630061Smckusick tstl r0\n\ 55730061Smckusick jneq 1f\n\ 55830061Smckusick pushl r1\n\ 55930061Smckusick pushl $_EASRTS\n\ 56030061Smckusick callf $12,_ERROR\n\ 56130061Smckusick 1:\n" }, 56230061Smckusick 56330061Smckusick { 1, "_CHR\n", 56430061Smckusick " movl (sp)+,r0\n\ 56530061Smckusick cmpl r0,$127\n\ 56630061Smckusick jlequ 1f\n\ 56730061Smckusick pushl r0\n\ 56830061Smckusick pushl $_ECHR\n\ 56930061Smckusick callf $12,_ERROR\n\ 57030061Smckusick 1:\n" }, 57130061Smckusick 57230061Smckusick { 0, "_LINO\n", 57330061Smckusick " incl __stcnt\n\ 57430061Smckusick cmpl __stcnt,__stlim\n\ 57530061Smckusick jlss 1f\n\ 57630061Smckusick pushl __stcnt\n\ 57730061Smckusick pushl $_ELINO\n\ 57830061Smckusick callf $12,_ERROR\n\ 57930061Smckusick 1:\n" }, 58030061Smckusick 58130061Smckusick { 1, "_NIL\n", 58230061Smckusick " movl (sp)+,r0\n\ 58330061Smckusick cmpl r0,__maxptr\n\ 58430061Smckusick jgtr 1f\n\ 58530061Smckusick cmpl r0,__minptr\n\ 58630061Smckusick jgeq 2f\n\ 58730061Smckusick 1:\n\ 58830061Smckusick pushl $0\n\ 58930061Smckusick pushl $_ENIL\n\ 59030061Smckusick callf $12,_ERROR\n\ 59130061Smckusick 2:\n" }, 59230061Smckusick 59330061Smckusick { 3, "_RANG4\n", 59430061Smckusick " movl (sp)+,r0\n\ 59530061Smckusick movl (sp)+,r1\n\ 59630061Smckusick movl (sp)+,r2\n\ 59730061Smckusick cmpl r0,r1\n\ 59830061Smckusick jlss 1f\n\ 59930061Smckusick cmpl r0,r2\n\ 60030061Smckusick jleq 2f\n\ 60130061Smckusick 1:\n\ 60230061Smckusick pushl r0\n\ 60330061Smckusick pushl $_ERANG\n\ 60430061Smckusick callf $12,_ERROR\n\ 60530061Smckusick 2:\n" }, 60630061Smckusick 60730061Smckusick { 2, "_RSNG4\n", 60830061Smckusick " movl (sp)+,r0\n\ 60930061Smckusick movl (sp)+,r1\n\ 61030061Smckusick cmpl r0,r1\n\ 61130061Smckusick jlequ 1f\n\ 61230061Smckusick pushl r0\n\ 61330061Smckusick pushl $_ERANG\n\ 61430061Smckusick callf $12,_ERROR\n\ 61530061Smckusick 1:\n" }, 61630061Smckusick 61730061Smckusick { 1, "_SEED\n", 61830061Smckusick " movl (sp)+,r1\n\ 61930061Smckusick movl __seed,r0\n\ 62030061Smckusick movl r1,__seed\n" }, 62130061Smckusick 62230061Smckusick { 3, "_SUBSC\n", 62330061Smckusick " movl (sp)+,r0\n\ 62430061Smckusick movl (sp)+,r1\n\ 62530061Smckusick movl (sp)+,r2\n\ 62630061Smckusick cmpl r0,r1\n\ 62730061Smckusick jlss 1f\n\ 62830061Smckusick cmpl r0,r2\n\ 62930061Smckusick jleq 2f\n\ 63030061Smckusick 1:\n\ 63130061Smckusick pushl r0\n\ 63230061Smckusick pushl $_ESUBSC\n\ 63330061Smckusick callf $12,_ERROR\n\ 63430061Smckusick 2:\n" }, 63530061Smckusick 63630061Smckusick { 2, "_SUBSCZ\n", 63730061Smckusick " movl (sp)+,r0\n\ 63830061Smckusick movl (sp)+,r1\n\ 63930061Smckusick cmpl r0,r1\n\ 64030061Smckusick jlequ 1f\n\ 64130061Smckusick pushl r0\n\ 64230061Smckusick pushl $_ESUBSC\n\ 64330061Smckusick callf $12,_ERROR\n\ 64430061Smckusick 1:\n" }, 64530061Smckusick #endif tahoe 64630061Smckusick 64724397Smckusick { 0, "", "" } 6482086Smckusick }; 649