|
|
1.1 ! root 1: /* ns32k-opcode.h */ ! 2: ! 3: #ifndef ns32k_opcodeT ! 4: #define ns32k_opcodeT int ! 5: #endif /* no ns32k_opcodeT */ ! 6: ! 7: struct not_wot /* ns32k opcode table: wot to do with this */ ! 8: /* particular opcode */ ! 9: { ! 10: int obits; /* number of opcode bits */ ! 11: int ibits; /* number of instruction bits */ ! 12: ns32k_opcodeT code; /* op-code (may be > 8 bits!) */ ! 13: char *args; /* how to compile said opcode */ ! 14: }; ! 15: ! 16: struct not /* ns32k opcode text */ ! 17: { ! 18: char * name; /* opcode name: lowercase string [key] */ ! 19: struct not_wot detail; /* rest of opcode table [datum] */ ! 20: }; ! 21: ! 22: /* F : 32 bit float ! 23: * L : 64 bit float ! 24: * B : byte ! 25: * W : word ! 26: * D : double-word ! 27: * Q : quad-word ! 28: * d : displacement ! 29: * q : quick ! 30: * i : immediate (8 bits) ! 31: * r : register number (3 bits) ! 32: * p : displacement - pc relative addressing ! 33: */ ! 34: static struct not ! 35: notstrs[] = ! 36: { ! 37: { "absf", 14,24, 0x35be, "1F2F" }, ! 38: { "absl", 14,24, 0x34be, "1L2L" }, ! 39: { "absb", 14,24, 0x304e, "1B2B" }, ! 40: { "absw", 14,24, 0x314e, "1W2W" }, ! 41: { "absd", 14,24, 0x334e, "1D2D" }, ! 42: { "acbb", 7,16, 0x4c, "2B1q3p" }, ! 43: { "addf", 14,24, 0x01be, "1F2F" }, ! 44: { "addl", 14,24, 0x00be, "1L2L" }, ! 45: { "addb", 6,16, 0x00, "1B2B" }, ! 46: { "addw", 6,16, 0x01, "1W2W" }, ! 47: { "addd", 6,16, 0x03, "1D2D" }, ! 48: { "addcb", 6,16, 0x10, "1B2B" }, ! 49: { "addcw", 6,16, 0x11, "1W2W" }, ! 50: { "addcd", 6,16, 0x13, "1D2D" }, ! 51: { "addpb", 14,24, 0x3c4e, "1B2B" }, ! 52: { "addpw", 14,24, 0x3d4e, "1W2W" }, ! 53: { "addpd", 14,24, 0x3f4e, "1D2D" }, ! 54: { "addqb", 7,16, 0x0c, "2B1q" }, ! 55: { "addqw", 7,16, 0x0d, "2W1q" }, ! 56: { "addqd", 7,16, 0x0f, "2D1q" }, ! 57: { "addr", 6,16, 0x27, "1D2D" }, ! 58: { "adjspb", 11,16, 0x057c, "1B" }, ! 59: { "adjspw", 11,16, 0x057d, "1W" }, ! 60: { "adjspd", 11,16, 0x057f, "1D" }, ! 61: { "andb", 6,16, 0x28, "1B2B" }, ! 62: { "andw", 6,16, 0x29, "1W2W" }, ! 63: { "andd", 6,16, 0x2b, "1D2D" }, ! 64: { "ashb", 14,24, 0x044e, "1B2B" }, ! 65: { "ashw", 14,24, 0x054e, "1B2W" }, ! 66: { "ashd", 14,24, 0x074e, "1B2D" }, ! 67: { "beq", 8,8, 0x0a, "1p" }, ! 68: { "bne", 8,8, 0x1a, "1p" }, ! 69: { "bcs", 8,8, 0x2a, "1p" }, ! 70: { "bcc", 8,8, 0x3a, "1p" }, ! 71: { "bhi", 8,8, 0x4a, "1p" }, ! 72: { "bls", 8,8, 0x5a, "1p" }, ! 73: { "bgt", 8,8, 0x6a, "1p" }, ! 74: { "ble", 8,8, 0x7a, "1p" }, ! 75: { "bfs", 8,8, 0x8a, "1p" }, ! 76: { "bfc", 8,8, 0x9a, "1p" }, ! 77: { "blo", 8,8, 0xaa, "1p" }, ! 78: { "bhs", 8,8, 0xba, "1p" }, ! 79: { "blt", 8,8, 0xca, "1p" }, ! 80: { "bge", 8,8, 0xda, "1p" }, ! 81: { "bicb", 6,16, 0x08, "1B2B" }, ! 82: { "bicw", 6,16, 0x09, "1W2W" }, ! 83: { "bicd", 6,16, 0x0b, "1D2D" }, ! 84: { "bicpsrb", 11,16, 0x17c, "1B" }, ! 85: { "bicpsrw", 11,16, 0x17d, "1W" }, ! 86: { "bispsrb", 11,16, 0x37c, "1B" }, ! 87: { "bispsrw", 11,16, 0x37d, "1W" }, ! 88: { "bpt", 8,8, 0xf2, "" }, ! 89: { "br", 8,8, 0xea, "1p" }, ! 90: { "bsr", 8,8, 0x02, "1p" }, ! 91: { "caseb", 11,16, 0x77c, "1B" }, ! 92: { "casew", 11,16, 0x77d, "1W" }, ! 93: { "cased", 11,16, 0x77f, "1D" }, ! 94: { "cbitb", 14,24, 0x084e, "1B2D" }, ! 95: { "cbitw", 14,24, 0x094e, "1W2D" }, ! 96: { "cbitd", 14,24, 0x0b4e, "1D2D" }, ! 97: { "cbitib", 14,24, 0x0c4e, "1B2D" }, ! 98: { "cbitiw", 14,24, 0x0d4e, "1W2D" }, ! 99: { "cbitid", 14,24, 0x0f4e, "1D2D" }, ! 100: { "checkb", 11,24, 0x0ee, "2A3B1r" }, ! 101: { "checkw", 11,24, 0x1ee, "2A3B1r" }, ! 102: { "checkd", 11,24, 0x3ee, "2A3D1r" }, ! 103: { "cmpf", 14,24, 0x09be, "1F2F" }, ! 104: { "cmpl", 14,24, 0x08be, "1L2L" }, ! 105: { "cmpb", 6,16, 0x04, "1B2B" }, ! 106: { "cmpw", 6,16, 0x05, "1W2W" }, ! 107: { "cmpd", 6,16, 0x07, "1D2D" }, ! 108: { "cmpmb", 14,24, 0x04ce, "1D2D3d" }, ! 109: { "cmpmw", 14,24, 0x05ce, "1D2D3d" }, ! 110: { "cmpmd", 14,24, 0x07ce, "1D2D3d" }, ! 111: { "cmpqb", 7,16, 0x1c, "2B1q" }, ! 112: { "cmpqw", 7,16, 0x1d, "2W1q" }, ! 113: { "cmpqd", 7,16, 0x1f, "2D1q" }, ! 114: { "cmpsb", 16,16, 0x040e, "1i" }, ! 115: { "cmpsw", 16,16, 0x050e, "1i" }, ! 116: { "cmpsd", 16,16, 0x070e, "1i" }, ! 117: { "cmpst", 16,16, 0x840e, "1i" }, ! 118: { "comb", 14,24, 0x344e, "1B2B" }, ! 119: { "comw", 14,24, 0x354e, "1W2W" }, ! 120: { "comd", 14,24, 0x374e, "1D2D" }, ! 121: { "cvtp", 11,24, 0x036e, "2D3D1r" }, ! 122: { "cxp", 8,8, 0x22, "1p" }, ! 123: { "cxpd", 11,16, 0x07f, "1D" }, ! 124: { "deib", 14,24, 0x2cce, "1B2W" }, ! 125: { "deiw", 14,24, 0x2cce, "1W2D" }, ! 126: { "deid", 14,24, 0x2cce, "1D2Q" }, ! 127: { "dia", 8,8, 0xc2, "" }, ! 128: { "divf", 14,24, 0x21be, "1F2F" }, ! 129: { "divl", 14,24, 0x20be, "1L2L" }, ! 130: { "divb", 14,24, 0x3cce, "1B2B" }, ! 131: { "divw", 14,24, 0x3dce, "1W2W" }, ! 132: { "divd", 14,24, 0x3fce, "1D2D" }, ! 133: { "enter", 8,8, 0x82, "1i2d" }, ! 134: { "exit", 8,8, 0x92, "1i" }, ! 135: { "extb", 11,24, 0x02e, "2D3B1r4d" }, ! 136: { "extw", 11,24, 0x12e, "2D3W1r4d" }, ! 137: { "extd", 11,24, 0x32e, "2D3D1r4d" }, ! 138: { "extsb", 14,24, 0x0cce, "1D2B3i" }, ! 139: { "extsw", 14,24, 0x0dce, "1D2W3i" }, ! 140: { "extsd", 14,24, 0x0fce, "1D2D3i" }, ! 141: { "ffsb", 14,24, 0x046e, "1B2B" }, ! 142: { "ffsw", 14,24, 0x056e, "1W2B" }, ! 143: { "ffsd", 14,24, 0x076e, "1D2B" }, ! 144: { "flag", 8,8, 0xd2, "" }, ! 145: { "floorfb", 14,24, 0x3c3e, "1F2B" }, ! 146: { "floorfw", 14,24, 0x3d3e, "1F2W" }, ! 147: { "floorfd", 14,24, 0x3f3e, "1F2D" }, ! 148: { "floorlb", 14,24, 0x383e, "1L2B" }, ! 149: { "floorlw", 14,24, 0x393e, "1L2W" }, ! 150: { "floorld", 14,24, 0x3b3e, "1L2D" }, ! 151: { "ibitb", 14,24, 0x384e, "1B2D" }, ! 152: { "ibitw", 14,24, 0x394e, "1W2D" }, ! 153: { "ibitd", 14,24, 0x3b4e, "1D2D" }, ! 154: { "indexb", 11,24, 0x42e, "2B3B1r" }, ! 155: { "indexw", 11,24, 0x52e, "2W3W1r" }, ! 156: { "indexd", 11,24, 0x72e, "2D3D1r" }, ! 157: { "insb", 11,24, 0x0ae, "2B3B1r4d" }, ! 158: { "insw", 11,24, 0x1ae, "2W3W1r4d" }, ! 159: { "insd", 11,24, 0x3ae, "2D3D1r4d" }, ! 160: { "inssb", 14,24, 0x08ce, "1B2D3i" }, ! 161: { "inssw", 14,24, 0x09ce, "1W2D3i" }, ! 162: { "inssd", 14,24, 0x0bce, "1D2D3i" }, ! 163: { "jsr", 11,16, 0x67f, "1A" }, ! 164: { "jump", 11,16, 0x27f, "1A" }, ! 165: { "lfsr", 19,24, 0x00f3e,"1D" }, ! 166: { "lmr", 15,24, 0x0b1e, "2D1q" }, ! 167: { "lprb", 7,16, 0x6c, "2B1q" }, ! 168: { "lprw", 7,16, 0x6d, "2W1q" }, ! 169: { "lprd", 7,16, 0x6f, "2D1q" }, ! 170: { "lshb", 14,24, 0x144e, "1B2B" }, ! 171: { "lshw", 14,24, 0x154e, "1B2W" }, ! 172: { "lshd", 14,24, 0x174e, "1B2D" }, ! 173: { "meib", 14,24, 0x24ce, "1B2W" }, ! 174: { "meiw", 14,24, 0x25ce, "1W2D" }, ! 175: { "meid", 14,24, 0x27ce, "1D2Q" }, ! 176: { "modb", 14,24, 0x38ce, "1B2B" }, ! 177: { "modw", 14,24, 0x39ce, "1W2W" }, ! 178: { "modd", 14,24, 0x3bce, "1D2D" }, ! 179: { "movf", 14,24, 0x05be, "1F2F" }, ! 180: { "movl", 14,24, 0x04be, "1L2L" }, ! 181: { "movb", 6,16, 0x14, "1B2B" }, ! 182: { "movw", 6,16, 0x15, "1W2W" }, ! 183: { "movd", 6,16, 0x17, "1D2D" }, ! 184: { "movbf", 14,24, 0x043e, "1B2F" }, ! 185: { "movwf", 14,24, 0x053e, "1W2F" }, ! 186: { "movdf", 14,24, 0x073e, "1D2F" }, ! 187: { "movbl", 14,24, 0x003e, "1B2L" }, ! 188: { "movwl", 14,24, 0x013e, "1W2L" }, ! 189: { "movdl", 14,24, 0x033e, "1D2L" }, ! 190: { "movfl", 14,24, 0x1b3e, "1F2L" }, ! 191: { "movlf", 14,24, 0x163e, "1L2F" }, ! 192: { "movmb", 14,24, 0x00ce, "1D2D3d" }, ! 193: { "movmw", 14,24, 0x00de, "1D2D3d" }, ! 194: { "movmd", 14,24, 0x00fe, "1D2D3d" }, ! 195: { "movqb", 7,16, 0x5c, "2B1q" }, ! 196: { "movqw", 7,16, 0x5d, "2B1q" }, ! 197: { "movqd", 7,16, 0x5f, "2B1q" }, ! 198: { "movsb", 16,16, 0x000e, "1i" }, ! 199: { "movsw", 16,16, 0x010e, "1i" }, ! 200: { "movsd", 16,16, 0x030e, "1i" }, ! 201: { "movst", 16,16, 0x800e, "1i" }, ! 202: { "movsub", 14,24, 0x0cae, "1A1A" }, ! 203: { "movsuw", 14,24, 0x0dae, "1A1A" }, ! 204: { "movsud", 14,24, 0x0fae, "1A1A" }, ! 205: { "movusb", 14,24, 0x1cae, "1A1A" }, ! 206: { "movusw", 14,24, 0x1dae, "1A1A" }, ! 207: { "movusd", 14,24, 0x1fae, "1A1A" }, ! 208: { "movxbd", 14,24, 0x1cce, "1B2D" }, ! 209: { "movxwd", 14,24, 0x1dce, "1W2D" }, ! 210: { "movxbw", 14,24, 0x10ce, "1B2W" }, ! 211: { "movzbd", 14,24, 0x18ce, "1B2D" }, ! 212: { "movzwd", 14,24, 0x19ce, "1W2D" }, ! 213: { "movzbw", 14,24, 0x14ce, "1B2W" }, ! 214: { "mulf", 14,24, 0x31be, "1F2F" }, ! 215: { "mull", 14,24, 0x30be, "1L2L" }, ! 216: { "mulb", 14,24, 0x20ce, "1B2B" }, ! 217: { "mulw", 14,24, 0x21ce, "1W2W" }, ! 218: { "muld", 14,24, 0x23ce, "1D2D" }, ! 219: { "negf", 14,24, 0x15be, "1F2F" }, ! 220: { "negl", 14,24, 0x14be, "1L2L" }, ! 221: { "negb", 14,24, 0x204e, "1B2B" }, ! 222: { "negw", 14,24, 0x214e, "1W2W" }, ! 223: { "negd", 14,24, 0x234e, "1D2D" }, ! 224: { "nop", 8,8, 0xa2, "" }, ! 225: { "notb", 14,24, 0x244e, "1B2B" }, ! 226: { "notw", 14,24, 0x254e, "1W2W" }, ! 227: { "notd", 14,24, 0x274e, "1D2D" }, ! 228: { "orb", 6,16, 0x18, "1B1B" }, ! 229: { "orw", 6,16, 0x19, "1W1W" }, ! 230: { "ord", 6,16, 0x1b, "1D1D" }, ! 231: { "quob", 14,24, 0x30ce, "1B2B" }, ! 232: { "quow", 14,24, 0x31ce, "1W2W" }, ! 233: { "quod", 14,24, 0x33ce, "1D2D" }, ! 234: { "rdval", 19,24, 0x0031e,"1A" }, ! 235: { "remb", 14,24, 0x34ce, "1B2B" }, ! 236: { "remw", 14,24, 0x35ce, "1W2W" }, ! 237: { "remd", 14,24, 0x37ce, "1D2D" }, ! 238: { "restore", 8,8, 0x72, "1i" }, ! 239: { "ret", 8,8, 0x12, "1d" }, ! 240: { "reti", 8,8, 0x52, "" }, ! 241: { "rett", 8,8, 0x42, "" }, ! 242: { "rotb", 14,24, 0x004e, "1B2B" }, ! 243: { "rotw", 14,24, 0x014e, "1B2W" }, ! 244: { "rotd", 14,24, 0x034e, "1B2D" }, ! 245: { "roundfb", 14,24, 0x243e, "1F2B" }, ! 246: { "roundfw", 14,24, 0x253e, "1F2W" }, ! 247: { "roundfd", 14,24, 0x273e, "1F2D" }, ! 248: { "roundlb", 14,24, 0x203e, "1L2B" }, ! 249: { "roundlw", 14,24, 0x213e, "1L2W" }, ! 250: { "roundld", 14,24, 0x233e, "1L2D" }, ! 251: { "rxp", 8,8, 0x32, "1d" }, ! 252: { "sCONDb", 7,16, 0x3c, "2B1q" }, ! 253: { "sCONDw", 7,16, 0x3d, "2D1q" }, ! 254: { "sCONDd", 7,16, 0x3f, "2D1q" }, ! 255: { "save", 8,8, 0x62, "1i" }, ! 256: { "sbitb", 14,24, 0x184e, "1B2A" }, ! 257: { "sbitw", 14,24, 0x194e, "1W2A" }, ! 258: { "sbitd", 14,24, 0x1b4e, "1D2A" }, ! 259: { "sbitib", 14,24, 0x1c4e, "1B2A" }, ! 260: { "sbitiw", 14,24, 0x1d4e, "1W2A" }, ! 261: { "sbitid", 14,24, 0x1f4e, "1D2A" }, ! 262: { "setcfg", 15,24, 0x0b0e, "5D1q" }, ! 263: { "sfsr", 14,24, 0x673e, "5D1D" }, ! 264: { "skpsb", 16,16, 0x0c0e, "1i" }, ! 265: { "skpsw", 16,16, 0x0d0e, "1i" }, ! 266: { "skpsd", 16,16, 0x0f0e, "1i" }, ! 267: { "skpst", 16,16, 0x8c0e, "1i" }, ! 268: { "smr", 15,24, 0x0f1e, "2D1q" }, ! 269: { "sprb", 7,16, 0x2c, "2B1q" }, ! 270: { "sprw", 7,16, 0x2d, "2W1q" }, ! 271: { "sprd", 7,16, 0x2f, "2D1q" }, ! 272: { "subf", 14,24, 0x11be, "1F2F" }, ! 273: { "subl", 14,24, 0x10be, "1L2L" }, ! 274: { "subb", 6,16, 0x20, "1B2B" }, ! 275: { "subw", 6,16, 0x21, "1W2W" }, ! 276: { "subd", 6,16, 0x23, "1D2D" }, ! 277: { "subcb", 6,16, 0x30, "1B2B" }, ! 278: { "subcw", 6,16, 0x31, "1W2W" }, ! 279: { "subcd", 6,16, 0x33, "1D2D" }, ! 280: { "subpb", 14,24, 0x2c4e, "1B2B" }, ! 281: { "subpw", 14,24, 0x2d4e, "1W2W" }, ! 282: { "subpd", 14,24, 0x2f4e, "1D2D" }, ! 283: #ifndef NS32K_SVC_IMMED_OPERANDS ! 284: { "svc", 8,8, 0xe2, "2i1i" }, /* not really, but unix uses it */ ! 285: #else ! 286: { "svc", 8,8, 0xe2, "" }, /* not really, but unix uses it */ ! 287: #endif ! 288: { "tbitb", 6,16, 0x34, "1B2A" }, ! 289: { "tbitw", 6,16, 0x35, "1W2A" }, ! 290: { "tbitd", 6,16, 0x37, "1D2A" }, ! 291: { "truncfb", 14,24, 0x2c3e, "1F2B" }, ! 292: { "truncfw", 14,24, 0x2d3e, "1F2W" }, ! 293: { "truncfd", 14,24, 0x2f3e, "1F2D" }, ! 294: { "trunclb", 14,24, 0x283e, "1L2B" }, ! 295: { "trunclw", 14,24, 0x293e, "1L2W" }, ! 296: { "truncld", 14,24, 0x2b3e, "1L2D" }, ! 297: { "wait", 8,8, 0xb2, "" }, ! 298: { "wrval", 19,24, 0x0071e,"1A" }, ! 299: { "xorb", 6,16, 0x38, "1B2B" }, ! 300: { "xorw", 6,16, 0x39, "1W2W" }, ! 301: { "xord", 6,16, 0x3b, "1D2D" }, ! 302: }; /* notstrs */ ! 303: ! 304: /* end: ns32k.opcode.h */ ! 305: ! 306: #define MAX_ARGS 4 ! 307: #define ARG_LEN 50
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.