Annotation of 43BSDTahoe/lib/old_compiler/dbx/ops.iris.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1983 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[] = "@(#)ops.iris.c 5.1 (Berkeley) 1/12/88";
        !             9: #endif not lint
        !            10: 
        !            11: static char rcsid[] = "$Header: ops.c,v 1.2 87/03/26 20:27:48 donn Exp $";
        !            12: 
        !            13: /*
        !            14:  * Machine operators.
        !            15:  */
        !            16: 
        !            17: #include "defs.h"
        !            18: #include "ops.h"
        !            19: #include "machine.h"
        !            20: 
        !            21: #ifndef public
        !            22: 
        !            23: /*
        !            24:  * 68000 opcodes.
        !            25:  */
        !            26: 
        !            27: #define IMDF "#0x%x"           /* immediate data format */
        !            28: 
        !            29: typedef struct {                       
        !            30:     unsigned short mask, match;
        !            31:     int (*opfun)();
        !            32:     char *farg;
        !            33: } Optab;
        !            34: 
        !            35: #endif
        !            36: 
        !            37: public String bname[16] = {
        !            38:     "ra", "sr", "hi", "ls", "cc", "cs", "ne",
        !            39:     "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"
        !            40: };
        !            41: 
        !            42: public String cname[16] = {
        !            43:     "ra", "f", "hi", "ls", "cc", "cs", "ne",
        !            44:     "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"
        !            45: };
        !            46: 
        !            47: public String dbname[16] = {
        !            48:     "t", "ra", "hi", "ls", "cc", "cs", "ne",
        !            49:     "eq", "vc", "vs", "pl", "mi", "ge", "lt", "gt", "le"
        !            50: };
        !            51: 
        !            52: public String shro[4] = { "as", "ls", "rox", "ro" };
        !            53: 
        !            54: public String bit[4] = { "btst", "bchg", "bclr", "bset" };
        !            55: 
        !            56: /*
        !            57:  * order is important here
        !            58:  */
        !            59: 
        !            60: public Optab optab[] = {
        !            61:     0xF000, 0x1000, omove, "b",                        /* move instructions */
        !            62:     0xF000, 0x2000, omove, "l",
        !            63:     0xF000, 0x3000, omove, "w",
        !            64:     0xF000, 0x6000, obranch, 0,                        /* branches   */
        !            65:     0xFF00, 0x0000, oimmed, "or",              /* op class 0  */
        !            66:     0xFF00, 0x0200, oimmed, "and",
        !            67:     0xFF00, 0x0400, oimmed, "sub",
        !            68:     0xFF00, 0x0600, oimmed, "add",
        !            69:     0xFF00, 0x0A00, oimmed, "eor",
        !            70:     0xFF00, 0x0C00, oimmed, "cmp",
        !            71:     0xFF00, 0x0E00, omovs,  "movs",
        !            72:     0xF100, 0x0100, biti, 0,
        !            73:     0xF800, 0x0800, biti, 0,
        !            74:     0xFFC0, 0x40C0, oneop, "move_from_sr\t",   /* op class 4 */
        !            75:     0xFF00, 0x4000, soneop, "negx",
        !            76:     0xFFC0, 0x42C0, oneop,  "movw      cc,",
        !            77:     0xFF00, 0x4200, soneop, "clr",
        !            78:     0xFFC0, 0x44C0, oneop, "move_to_ccr        ",
        !            79:     0xFF00, 0x4400, soneop, "neg",
        !            80:     0xFFC0, 0x46C0, oneop, "move_to_sr ",
        !            81:     0xFF00, 0x4600, soneop, "not",
        !            82:     0xFFC0, 0x4800, oneop, "nbcd       ",
        !            83:     0xFFF8, 0x4840, oreg, "\tswap\td%D",
        !            84:     0xFFC0, 0x4840, oneop, "pea        ",
        !            85:     0xFFF8, 0x4880, oreg, "\textw\td%D",
        !            86:     0xFFF8, 0x48C0, oreg, "\textl\td%D",
        !            87:     0xFB80, 0x4880, omovem, 0,
        !            88:     0xFFC0, 0x4AC0, oneop, "tas        ",
        !            89:     0xFF00, 0x4A00, soneop, "tst",
        !            90:     0xFFF0, 0x4E40, otrap, 0,
        !            91:     0xFFF8, 0x4E50, olink, 0,
        !            92:     0xFFFE, 0x4E7A, omovc, "\tmovc\t",
        !            93:     0xFFF8, 0x4880, oreg, "\textw\td%D",
        !            94:     0xFFF8, 0x48C0, oreg, "\textl\td%D",
        !            95:     0xFFF8, 0x4E58, oreg, "\tunlk\ta%D",
        !            96:     0xFFF8, 0x4E60, oreg, "\tmove\ta%D,usp",
        !            97:     0xFFF8, 0x4E68, oreg, "\tmove\tusp,a%D",
        !            98:     0xFFFF, 0x4E70, oprint, "reset",
        !            99:     0xFFFF, 0x4E71, oprint, "nop",
        !           100:     0xFFFF, 0x4E72, ostop, "\tstop\t0x%x",
        !           101:     0xFFFF, 0x4E73, oprint, "rte",
        !           102:     0xFFFF, 0x4E74, ortspop, "\trts\t0x%x",
        !           103:     0xFFFF, 0x4E75, orts, "rts",
        !           104:     0xFFFF, 0x4E76, oprint, "trapv",
        !           105:     0xFFFF, 0x4E77, oprint, "rtr",
        !           106:     0xFFC0, 0x4E80, jsrop, "jsr        ",
        !           107:     0xFFC0, 0x4EC0, jmpop, "jmp        ",
        !           108:     0xF1C0, 0x4180, ochk, "chk",
        !           109:     0xF1C0, 0x41C0, ochk, "lea",
        !           110:     0xF0F8, 0x50C8, odbcc, "\tdb%s\td%D,",
        !           111:     0xF0C0, 0x50C0, oscc,  0,
        !           112:     0xF100, 0x5000, oquick, "addq",
        !           113:     0xF100, 0x5100, oquick, "subq",
        !           114:     0xF000, 0x7000, omoveq, 0,
        !           115:     0xF1C0, 0x80C0, ochk, "divu",
        !           116:     0xF1C0, 0x81C0, ochk, "divs",
        !           117:     0xF1F0, 0x8100, extend, "sbcd",
        !           118:     0xF000, 0x8000, opmode, "or",
        !           119:     0xF1C0, 0x91C0, opmode, "sub",
        !           120:     0xF130, 0x9100, extend, "subx",
        !           121:     0xF000, 0x9000, opmode, "sub",
        !           122:     0xF1C0, 0xB1C0, opmode, "cmp",
        !           123:     0xF138, 0xB108, extend, "cmpm",
        !           124:     0xF100, 0xB000, opmode, "cmp",
        !           125:     0xF100, 0xB100, opmode, "eor",
        !           126:     0xF1C0, 0xC0C0, ochk, "mulu",
        !           127:     0xF1C0, 0xC1C0, ochk, "muls",
        !           128:     0xF1F8, 0xC188, extend, "exg",
        !           129:     0xF1F8, 0xC148, extend, "exg",
        !           130:     0xF1F8, 0xC140, extend, "exg",
        !           131:     0xF1F0, 0xC100, extend, "abcd",
        !           132:     0xF000, 0xC000, opmode, "and",
        !           133:     0xF1C0, 0xD1C0, opmode, "add",
        !           134:     0xF130, 0xD100, extend, "addx",
        !           135:     0xF000, 0xD000, opmode, "add",
        !           136:     0xF100, 0xE000, shroi, "r",
        !           137:     0xF100, 0xE100, shroi, "l",
        !           138:     0, 0, 0, 0
        !           139: };
        !           140: 

unix.superglobalmegacorp.com

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