148101Sbostic /*-
2*62133Sbostic  * Copyright (c) 1980, 1993
3*62133Sbostic  *	The Regents of the University of California.  All rights reserved.
448101Sbostic  *
548101Sbostic  * %sccs.include.redist.c%
622364Sdist  */
75478Slinton 
822364Sdist #ifndef lint
9*62133Sbostic static char sccsid[] = "@(#)optab.c	8.1 (Berkeley) 06/06/93";
1048101Sbostic #endif /* not lint */
115478Slinton 
125478Slinton /*
135478Slinton  * px opcode table
145478Slinton  */
155478Slinton 
165478Slinton #include "optab.h"
175478Slinton 
185478Slinton OPTAB optab[] ={
1932286Smckusick 	{ "badop0" },
205478Slinton 	{ "nodump", PSUBOP, LWORD, HWORD, STRING },
2132286Smckusick #ifdef ADDR32
2232286Smckusick 	{ "beg", PSUBOP, LWORD, LWORD, HWORD, LWORD, STRING },
2332286Smckusick #else
2432286Smckusick 	{ "beg", PSUBOP, LWORD, LWORD, HWORD, HWORD, STRING },
2532286Smckusick #endif
265478Slinton 	{ "end" },
275478Slinton 	{ "call", DISP, ADDR4 },
285478Slinton 	{ "fcall" },
295478Slinton 	{ "frtn", PSUBOP },
305478Slinton 	{ "fsav", SUBOP, LWORD },
315478Slinton 	{ "sdup2" },
325478Slinton 	{ "sdup4" },
335478Slinton 	{ "tra", ADDR2 },
345478Slinton 	{ "tra4", ADDR4 },
355478Slinton 	{ "goto", DISP, ADDR4 },
365478Slinton 	{ "lino", PSUBOP },
375478Slinton 	{ "push", PSUBOP },
3832286Smckusick 	{ "badop15" },
395478Slinton 	{ "if", ADDR2 },
405478Slinton 	{ "rel2", SUBOP },
415478Slinton 	{ "rel4", SUBOP },
425478Slinton 	{ "rel24", SUBOP },
435478Slinton 	{ "rel42", SUBOP },
445478Slinton 	{ "rel8", SUBOP },
455478Slinton 	{ "relg", SUBOP, VLEN },
465478Slinton 	{ "relt", SUBOP, VLEN },
475478Slinton 	{ "rel28", SUBOP },
485478Slinton 	{ "rel48", SUBOP },
495478Slinton 	{ "rel82", SUBOP },
505478Slinton 	{ "rel84", SUBOP },
515478Slinton 	{ "and" },
525478Slinton 	{ "or" },
535478Slinton 	{ "not" },
5432286Smckusick 	{ "badop31" },
555478Slinton 	{ "as2" },
565478Slinton 	{ "as4" },
575478Slinton 	{ "as24" },
585478Slinton 	{ "as42" },
595478Slinton 	{ "as21" },
605478Slinton 	{ "as41" },
615478Slinton 	{ "as28" },
625478Slinton 	{ "as48" },
635478Slinton 	{ "as8" },
645478Slinton 	{ "as" },
655478Slinton 	{ "inx2p2", PSUBOP },
665478Slinton 	{ "inx4p2", PSUBOP },
675478Slinton 	{ "inx2", PSUBOP, HWORD, HWORD },
685478Slinton 	{ "inx4", PSUBOP, HWORD, HWORD },
695478Slinton 	{ "off", PSUBOP },
705478Slinton 	{ "nil" },
715478Slinton 	{ "add2" },
725478Slinton 	{ "add4" },
735478Slinton 	{ "add24" },
745478Slinton 	{ "add42" },
755478Slinton 	{ "add28" },
765478Slinton 	{ "add48" },
775478Slinton 	{ "add82" },
785478Slinton 	{ "add84" },
795478Slinton 	{ "sub2" },
805478Slinton 	{ "sub4" },
815478Slinton 	{ "sub24" },
825478Slinton 	{ "sub42" },
835478Slinton 	{ "sub28" },
845478Slinton 	{ "sub48" },
855478Slinton 	{ "sub82" },
865478Slinton 	{ "sub84" },
875478Slinton 	{ "mul2" },
885478Slinton 	{ "mul4" },
895478Slinton 	{ "mul24" },
905478Slinton 	{ "mul42" },
915478Slinton 	{ "mul28" },
925478Slinton 	{ "mul48" },
935478Slinton 	{ "mul82" },
945478Slinton 	{ "mul84" },
955478Slinton 	{ "abs2" },
965478Slinton 	{ "abs4" },
975478Slinton 	{ "abs8" },
9832286Smckusick 	{ "badop75" },
995478Slinton 	{ "neg2" },
1005478Slinton 	{ "neg4" },
1015478Slinton 	{ "neg8" },
10232286Smckusick 	{ "badop79" },
1035478Slinton 	{ "div2" },
1045478Slinton 	{ "div4" },
1055478Slinton 	{ "div24" },
1065478Slinton 	{ "div42" },
1075478Slinton 	{ "mod2" },
1085478Slinton 	{ "mod4" },
1095478Slinton 	{ "mod24" },
1105478Slinton 	{ "mod42" },
1115478Slinton 	{ "add8" },
1125478Slinton 	{ "sub8" },
1135478Slinton 	{ "mul8" },
1145478Slinton 	{ "dvd8" },
1155478Slinton 	{ "stoi" },
1165478Slinton 	{ "stod" },
1175478Slinton 	{ "itod" },
1185478Slinton 	{ "itos" },
1195478Slinton 	{ "dvd2" },
1205478Slinton 	{ "dvd4" },
1215478Slinton 	{ "dvd24" },
1225478Slinton 	{ "dvd42" },
1235478Slinton 	{ "dvd28" },
1245478Slinton 	{ "dvd48" },
1255478Slinton 	{ "dvd82" },
1265478Slinton 	{ "dvd84" },
1275478Slinton 	{ "rv1", DISP, ADDR2 },
1285478Slinton 	{ "rv14", DISP, ADDR2 },
1295478Slinton 	{ "rv2", DISP, ADDR2 },
1305478Slinton 	{ "rv24", DISP, ADDR2 },
1315478Slinton 	{ "rv4", DISP, ADDR2 },
1325478Slinton 	{ "rv8", DISP, ADDR2 },
1335478Slinton 	{ "rv", PSUBOP, DISP, ADDR2 },
1345478Slinton 	{ "lv", DISP, HWORD },
1355478Slinton 	{ "lrv1", DISP, ADDR4 },
1365478Slinton 	{ "lrv14", DISP, ADDR4 },
1375478Slinton 	{ "lrv2", DISP, ADDR4 },
1385478Slinton 	{ "lrv24", DISP, ADDR4 },
1395478Slinton 	{ "lrv4", DISP, ADDR4 },
1405478Slinton 	{ "lrv8", DISP, ADDR4 },
1415478Slinton 	{ "lrv", PSUBOP, DISP, ADDR4 },
1425478Slinton 	{ "llv", DISP, ADDR4 },
1435478Slinton 	{ "ind1" },
1445478Slinton 	{ "ind14" },
1455478Slinton 	{ "ind2" },
1465478Slinton 	{ "ind24" },
1475478Slinton 	{ "ind4" },
1485478Slinton 	{ "ind8" },
1495478Slinton 	{ "ind" },
15032286Smckusick 	{ "badop127" },
1515478Slinton 	{ "con1", SUBOP },
1525478Slinton 	{ "con14", SUBOP },
1535478Slinton 	{ "con2", HWORD },
1545478Slinton 	{ "con24", HWORD },
1555478Slinton 	{ "con4", LWORD },
1565478Slinton 	{ "con8", LWORD, LWORD },
1575478Slinton 	{ "con", HWORD },
1585478Slinton 	{ "lvcon", PSUBOP, STRING },
1595478Slinton 	{ "rang2", HWORD, HWORD },
1605478Slinton 	{ "rang42", HWORD, HWORD },
1615478Slinton 	{ "rsng2", HWORD },
1625478Slinton 	{ "rsng42", HWORD },
1635478Slinton 	{ "rang4", LWORD, LWORD },
1645478Slinton 	{ "rang24", LWORD, LWORD },
1655478Slinton 	{ "rsng4", LWORD },
1665478Slinton 	{ "rsng24", LWORD },
1675478Slinton 	{ "stlim" },
1685478Slinton 	{ "llimit" },
1695478Slinton 	{ "buff", PSUBOP },
1705478Slinton 	{ "halt" },
17132286Smckusick 	{ "badop148" },
17232286Smckusick 	{ "badop149" },
17332286Smckusick 	{ "badop150" },
17432286Smckusick 	{ "badop151" },
1755478Slinton 	{ "*ord2" },
1765478Slinton 	{ "*cong" },
1775478Slinton 	{ "*conc" },
1785478Slinton 	{ "*conc4" },
1795478Slinton 	{ "*abort" },
1805478Slinton 	{ "pxpbuf", HWORD },
1815478Slinton 	{ "count", HWORD },
18232286Smckusick 	{ "badop159" },
1835478Slinton 	{ "case1op", HWORD },
1845478Slinton 	{ "case2op", HWORD },
1855478Slinton 	{ "case4op", HWORD },
1865478Slinton 	{ "*casebeg" },
1875478Slinton 	{ "*case1" },
1885478Slinton 	{ "*case2" },
1895478Slinton 	{ "*case4" },
1905478Slinton 	{ "*caseend" },
1915478Slinton 	{ "addt" },
1925478Slinton 	{ "subt" },
1935478Slinton 	{ "mult" },
1945478Slinton 	{ "inct" },
1955478Slinton 	{ "cttot", PSUBOP, HWORD, HWORD },
1965478Slinton 	{ "card", PSUBOP },
1975478Slinton 	{ "in", PSUBOP, HWORD, HWORD },
1985478Slinton 	{ "asrt" },
1995478Slinton 	{ "for1u", HWORD, HWORD, ADDR2 },
2005478Slinton 	{ "for2u", HWORD, HWORD, ADDR2 },
2015478Slinton 	{ "for4u", LWORD, LWORD, ADDR2 },
2025478Slinton 	{ "for1d", HWORD, HWORD, ADDR2 },
2035478Slinton 	{ "for2d", HWORD, HWORD, ADDR2 },
2045478Slinton 	{ "for4d", LWORD, LWORD, ADDR2 },
20532286Smckusick 	{ "badop182" },
20632286Smckusick 	{ "badop183" },
2075478Slinton 	{ "reade", ADDR4 },
2085478Slinton 	{ "read4" },
2095478Slinton 	{ "readc" },
2105478Slinton 	{ "read8" },
2115478Slinton 	{ "readln" },
2125478Slinton 	{ "eof" },
2135478Slinton 	{ "eoln" },
21432286Smckusick 	{ "badop191" },
2155478Slinton 	{ "writec" },
2165478Slinton 	{ "writes" },
2175478Slinton 	{ "writef", PSUBOP },
2185478Slinton 	{ "writln" },
2195478Slinton 	{ "page" },
2205478Slinton 	{ "nam", ADDR4 },
2215478Slinton 	{ "max", PSUBOP, HWORD },
2225478Slinton 	{ "min", PSUBOP },
2235478Slinton 	{ "unit" },
2245478Slinton 	{ "unitinp" },
2255478Slinton 	{ "unitout" },
2265478Slinton 	{ "message" },
2275478Slinton 	{ "get" },
2285478Slinton 	{ "put" },
2295478Slinton 	{ "fnil" },
23032286Smckusick 	{ "badop207" },
2316077Slinton 	{ "defname" },
2325478Slinton 	{ "reset" },
2335478Slinton 	{ "rewrite" },
2345478Slinton 	{ "file" },
2355478Slinton 	{ "remove" },
2365478Slinton 	{ "flush" },
23732286Smckusick 	{ "badop214" },
23832286Smckusick 	{ "badop215" },
2395478Slinton 	{ "pack", PSUBOP, HWORD, HWORD, HWORD },
2405478Slinton 	{ "unpack", PSUBOP, HWORD, HWORD, HWORD },
2417972Slinton 	{ "new", PSUBOP },
2427972Slinton 	{ "dispose", PSUBOP },
2437972Slinton 	{ "dfdisp", PSUBOP },
2445478Slinton 	{ "argc" },
2455478Slinton 	{ "argv", PSUBOP },
24632286Smckusick 	{ "badop223" },
2475478Slinton 	{ "clck" },
2485478Slinton 	{ "wclck" },
2495478Slinton 	{ "sclck" },
2505478Slinton 	{ "date" },
2515478Slinton 	{ "time" },
2525478Slinton 	{ "undef" },
25332286Smckusick 	{ "badop230" },
25432286Smckusick 	{ "badop231" },
2555478Slinton 	{ "atan" },
2565478Slinton 	{ "cos" },
2575478Slinton 	{ "exp" },
2585478Slinton 	{ "ln" },
2595478Slinton 	{ "sin" },
2605478Slinton 	{ "sqrt" },
2615478Slinton 	{ "chr2" },
2625478Slinton 	{ "chr4" },
2635478Slinton 	{ "odd2" },
2645478Slinton 	{ "odd4" },
26532286Smckusick 	{ "pred2", HWORD, HWORD },
26632286Smckusick 	{ "pred4", LWORD, LWORD },
26732286Smckusick 	{ "pred24", HWORD, HWORD },
26832286Smckusick 	{ "succ2", HWORD, HWORD },
26932286Smckusick 	{ "succ4", LWORD, LWORD },
27032286Smckusick 	{ "succ24", HWORD, HWORD },
2715478Slinton 	{ "seed" },
2725478Slinton 	{ "random" },
2735478Slinton 	{ "expo" },
2745478Slinton 	{ "sqr2" },
2755478Slinton 	{ "sqr4" },
2765478Slinton 	{ "sqr8" },
2775478Slinton 	{ "round" },
2785478Slinton 	{ "trunc" },
2795478Slinton };
280