Annotation of 43BSDReno/pgrm/dbx/ops.iris.c, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1983 The Regents of the University of California.
                      3:  * All rights reserved.
                      4:  *
                      5:  * Redistribution and use in source and binary forms are permitted
                      6:  * provided that: (1) source distributions retain this entire copyright
                      7:  * notice and comment, and (2) distributions including binaries display
                      8:  * the following acknowledgement:  ``This product includes software
                      9:  * developed by the University of California, Berkeley and its contributors''
                     10:  * in the documentation or other materials provided with the distribution
                     11:  * and in all advertising materials mentioning features or use of this
                     12:  * software. Neither the name of the University nor the names of its
                     13:  * contributors may be used to endorse or promote products derived
                     14:  * from this software without specific prior written permission.
                     15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     16:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     17:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     18:  */
                     19: 
                     20: #ifndef lint
                     21: static char sccsid[] = "@(#)ops.iris.c 5.3 (Berkeley) 6/1/90";
                     22: #endif /* not lint */
                     23: 
                     24: /*
                     25:  * Machine operators.
                     26:  */
                     27: 
                     28: #include "defs.h"
                     29: #include "ops.h"
                     30: #include "machine.h"
                     31: 
                     32: #ifndef public
                     33: 
                     34: /*
                     35:  * 68000 opcodes.
                     36:  */
                     37: 
                     38: #define IMDF "#0x%x"           /* immediate data format */
                     39: 
                     40: typedef struct {                       
                     41:     unsigned short mask, match;
                     42:     int (*opfun)();
                     43:     char *farg;
                     44: } Optab;
                     45: 
                     46: #endif
                     47: 
                     48: public String bname[16] = {
                     49:     "ra", "sr", "hi", "ls", "cc", "cs", "ne",
                     50:     "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"
                     51: };
                     52: 
                     53: public String cname[16] = {
                     54:     "ra", "f", "hi", "ls", "cc", "cs", "ne",
                     55:     "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"
                     56: };
                     57: 
                     58: public String dbname[16] = {
                     59:     "t", "ra", "hi", "ls", "cc", "cs", "ne",
                     60:     "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"
                     61: };
                     62: 
                     63: public String shro[4] = { "as", "ls", "rox", "ro" };
                     64: 
                     65: public String bit[4] = { "btst", "bchg", "bclr", "bset" };
                     66: 
                     67: /*
                     68:  * order is important here
                     69:  */
                     70: 
                     71: public Optab optab[] = {
                     72:     0xF000, 0x1000, omove, "b",                        /* move instructions */
                     73:     0xF000, 0x2000, omove, "l",
                     74:     0xF000, 0x3000, omove, "w",
                     75:     0xF000, 0x6000, obranch, 0,                        /* branches   */
                     76:     0xFF00, 0x0000, oimmed, "or",              /* op class 0  */
                     77:     0xFF00, 0x0200, oimmed, "and",
                     78:     0xFF00, 0x0400, oimmed, "sub",
                     79:     0xFF00, 0x0600, oimmed, "add",
                     80:     0xFF00, 0x0A00, oimmed, "eor",
                     81:     0xFF00, 0x0C00, oimmed, "cmp",
                     82:     0xFF00, 0x0E00, omovs,  "movs",
                     83:     0xF100, 0x0100, biti, 0,
                     84:     0xF800, 0x0800, biti, 0,
                     85:     0xFFC0, 0x40C0, oneop, "move_from_sr\t",   /* op class 4 */
                     86:     0xFF00, 0x4000, soneop, "negx",
                     87:     0xFFC0, 0x42C0, oneop,  "movw      cc,",
                     88:     0xFF00, 0x4200, soneop, "clr",
                     89:     0xFFC0, 0x44C0, oneop, "move_to_ccr        ",
                     90:     0xFF00, 0x4400, soneop, "neg",
                     91:     0xFFC0, 0x46C0, oneop, "move_to_sr ",
                     92:     0xFF00, 0x4600, soneop, "not",
                     93:     0xFFC0, 0x4800, oneop, "nbcd       ",
                     94:     0xFFF8, 0x4840, oreg, "\tswap\td%D",
                     95:     0xFFC0, 0x4840, oneop, "pea        ",
                     96:     0xFFF8, 0x4880, oreg, "\textw\td%D",
                     97:     0xFFF8, 0x48C0, oreg, "\textl\td%D",
                     98:     0xFB80, 0x4880, omovem, 0,
                     99:     0xFFC0, 0x4AC0, oneop, "tas        ",
                    100:     0xFF00, 0x4A00, soneop, "tst",
                    101:     0xFFF0, 0x4E40, otrap, 0,
                    102:     0xFFF8, 0x4E50, olink, 0,
                    103:     0xFFFE, 0x4E7A, omovc, "\tmovc\t",
                    104:     0xFFF8, 0x4880, oreg, "\textw\td%D",
                    105:     0xFFF8, 0x48C0, oreg, "\textl\td%D",
                    106:     0xFFF8, 0x4E58, oreg, "\tunlk\ta%D",
                    107:     0xFFF8, 0x4E60, oreg, "\tmove\ta%D,usp",
                    108:     0xFFF8, 0x4E68, oreg, "\tmove\tusp,a%D",
                    109:     0xFFFF, 0x4E70, oprint, "reset",
                    110:     0xFFFF, 0x4E71, oprint, "nop",
                    111:     0xFFFF, 0x4E72, ostop, "\tstop\t0x%x",
                    112:     0xFFFF, 0x4E73, oprint, "rte",
                    113:     0xFFFF, 0x4E74, ortspop, "\trts\t0x%x",
                    114:     0xFFFF, 0x4E75, orts, "rts",
                    115:     0xFFFF, 0x4E76, oprint, "trapv",
                    116:     0xFFFF, 0x4E77, oprint, "rtr",
                    117:     0xFFC0, 0x4E80, jsrop, "jsr        ",
                    118:     0xFFC0, 0x4EC0, jmpop, "jmp        ",
                    119:     0xF1C0, 0x4180, ochk, "chk",
                    120:     0xF1C0, 0x41C0, ochk, "lea",
                    121:     0xF0F8, 0x50C8, odbcc, "\tdb%s\td%D,",
                    122:     0xF0C0, 0x50C0, oscc,  0,
                    123:     0xF100, 0x5000, oquick, "addq",
                    124:     0xF100, 0x5100, oquick, "subq",
                    125:     0xF000, 0x7000, omoveq, 0,
                    126:     0xF1C0, 0x80C0, ochk, "divu",
                    127:     0xF1C0, 0x81C0, ochk, "divs",
                    128:     0xF1F0, 0x8100, extend, "sbcd",
                    129:     0xF000, 0x8000, opmode, "or",
                    130:     0xF1C0, 0x91C0, opmode, "sub",
                    131:     0xF130, 0x9100, extend, "subx",
                    132:     0xF000, 0x9000, opmode, "sub",
                    133:     0xF1C0, 0xB1C0, opmode, "cmp",
                    134:     0xF138, 0xB108, extend, "cmpm",
                    135:     0xF100, 0xB000, opmode, "cmp",
                    136:     0xF100, 0xB100, opmode, "eor",
                    137:     0xF1C0, 0xC0C0, ochk, "mulu",
                    138:     0xF1C0, 0xC1C0, ochk, "muls",
                    139:     0xF1F8, 0xC188, extend, "exg",
                    140:     0xF1F8, 0xC148, extend, "exg",
                    141:     0xF1F8, 0xC140, extend, "exg",
                    142:     0xF1F0, 0xC100, extend, "abcd",
                    143:     0xF000, 0xC000, opmode, "and",
                    144:     0xF1C0, 0xD1C0, opmode, "add",
                    145:     0xF130, 0xD100, extend, "addx",
                    146:     0xF000, 0xD000, opmode, "add",
                    147:     0xF100, 0xE000, shroi, "r",
                    148:     0xF100, 0xE100, shroi, "l",
                    149:     0, 0, 0, 0
                    150: };
                    151: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.