|
|
1.1 ! root 1: /* ! 2: * This file contains all of the machine specific tables used ! 3: * by the coder half of the Intel iAPX-86 code generator. ! 4: */ ! 5: ! 6: #ifdef vax ! 7: #include "INC$LIB:cc1.h" ! 8: #else ! 9: #include "cc1.h" ! 10: #endif ! 11: ! 12: /* ! 13: * Width table. ! 14: */ ! 15: char wtype[] = { ! 16: 0, /* S8 */ ! 17: 0, /* U8 */ ! 18: 1, /* S16 */ ! 19: 1, /* U16 */ ! 20: 2, /* S32 */ ! 21: 2, /* U32 */ ! 22: 3, /* F32 */ ! 23: 4, /* F64 */ ! 24: 5, /* BLK */ ! 25: 0, /* FLD8 */ ! 26: 1, /* FLD16 */ ! 27: 2, /* LPTR */ ! 28: 2, /* LPTB */ ! 29: 1, /* SPTR */ ! 30: 1 /* SPTB */ ! 31: }; ! 32: ! 33: /* ! 34: * Register table. ! 35: * Indexed by 'real' register numbers (as defined in mch.h). ! 36: */ ! 37: REGDESC reg[] = { ! 38: /* KIND KIND int REGNAME REGNAME REGNAME PREGSET */ ! 39: /* r_lvalue r_rvalue r_goal r_enpair r_hihalf r_lohalf r_phys */ ! 40: /* ax */ 0, KWB|KSP, MRVALUE, DXAX, AH, AL, BAX, ! 41: /* dx */ 0, KWB|KSP, MRVALUE, DXAX, DH, DL, BDX, ! 42: /* bx */ KWB|KSP, KWB|KSP, MRVALUE, CXBX, BH, BL, BBX, ! 43: /* cx */ 0, KWB|KSP, MRVALUE, CXBX, CH, CL, BCX, ! 44: /* si */ KW|KSP, KW|KSP, MRVALUE, -1, -1, -1, BSI, ! 45: /* di */ KW|KSP, KW|KSP, MRVALUE, -1, -1, -1, BDI, ! 46: /* sp */ 0, 0, -1, -1, -1, -1, BSP, ! 47: /* bp */ KW|KSP, 0, -1, -1, -1, -1, BBP, ! 48: /* fpac */ 0, KD, MRVALUE, -1, -1, -1, BFPAC, ! 49: /* es */ 0, 0, -1, -1, -1, -1, BES, ! 50: /* cs */ 0, 0, -1, -1, -1, -1, BCS, ! 51: /* ss */ 0, 0, -1, -1, -1, -1, BSS, ! 52: /* ds */ 0, 0, -1, -1, -1, -1, BDS, ! 53: /* dxax */ 0, KL|KLP, MRVALUE, -1, DX, AX, BDX|BAX, ! 54: /* cxbx */ KL, KL|KLP, MRVALUE, -1, CX, BX, BCX|BBX, ! 55: /* sssp */ 0, 0, -1, -1, SS, SP, BSS|BSP, ! 56: /* ssbp */ 0, 0, -1, -1, SS, BP, BSS|BBP, ! 57: /* esax */ 0, KLP, MLVALUE, -1, ES, AX, BES|BAX, ! 58: /* esbx */ KLP, 0, MLVALUE, -1, ES, BX, BES|BBX, ! 59: /* essi */ KLP, 0, MLVALUE, -1, ES, SI, BES|BSI, ! 60: /* esdi */ KLP, 0, MLVALUE, -1, ES, DI, BES|BDI, ! 61: /* dsax */ 0, KLP, MLVALUE, -1, DS, AX, BDS|BAX, ! 62: /* dsbx */ KLP, 0, MLVALUE, -1, DS, BX, BDS|BBX, ! 63: /* dssi */ KLP, 0, MLVALUE, -1, DS, SI, BDS|BSI, ! 64: /* dsdi */ KLP, 0, MLVALUE, -1, DS, DI, BDS|BDI, ! 65: /* al */ 0, 0, -1, AX, -1, -1, BAX, ! 66: /* bl */ 0, 0, -1, BX, -1, -1, BBX, ! 67: /* cl */ 0, 0, -1, CX, -1, -1, BCX, ! 68: /* dl */ 0, 0, -1, DX, -1, -1, BDX, ! 69: /* ah */ 0, 0, -1, AX, -1, -1, BAX, ! 70: /* bh */ 0, 0, -1, BX, -1, -1, BBX, ! 71: /* ch */ 0, 0, -1, CX, -1, -1, BCX, ! 72: /* dh */ 0, 0, -1, DX, -1, -1, BDX ! 73: /* None */ ! 74: /* Anyr */ ! 75: /* Anyl */ ! 76: /* Pair */ ! 77: /* Temp */ ! 78: /* Lo */ ! 79: /* Hi */ ! 80: }; ! 81: ! 82: /* ! 83: * The opcode table. ! 84: * Indexed by operation. ! 85: * The 0th and 1st entries of the relations are used by REL0 and by REL1. ! 86: * The 2nd entry is the special supress EQ/NE entry used by LREL1 and LREL0. ! 87: */ ! 88: unsigned char optab[][3] = { ! 89: ! 90: { ZADD, ZINC, ZADC }, ! 91: { ZSUB, ZDEC, ZSBB }, ! 92: { ZMUL, 0, 0 }, ! 93: { ZDIV, 0, 0 }, ! 94: { ZDIV, 0, 0 }, ! 95: { ZAND, ZTEST, ZSUB }, ! 96: { ZOR, 0, 0 }, ! 97: { ZXOR, ZNOT, 0 }, ! 98: { ZSAL, ZSHL, ZRCL }, ! 99: { ZSAR, ZSHR, ZRCR }, ! 100: ! 101: { ZADD, ZINC, ZADC }, ! 102: { ZSUB, ZDEC, ZSBB }, ! 103: { ZMUL, ZMOV, ZMOVB }, ! 104: { ZDIV, ZMOV, ZMOVB }, ! 105: { ZDIV, ZMOV, ZMOVB }, ! 106: { ZAND, ZSUB, 0 }, ! 107: { ZOR, 0, 0 }, ! 108: { ZXOR, ZNOT, 0 }, ! 109: { ZSAL, ZSHL, ZRCL }, ! 110: { ZSAR, ZSHR, ZRCR }, ! 111: ! 112: { ZJE, ZJE, 0 }, ! 113: { ZJNE, ZJNE, 0 }, ! 114: { ZJG, 0, ZJG }, ! 115: { ZJGE, ZJNS, ZJG }, ! 116: { ZJLE, 0, ZJL }, ! 117: { ZJL, ZJS, ZJL }, ! 118: { ZJA, 0, ZJA }, ! 119: { ZJAE, 0, ZJA }, ! 120: { ZJBE, 0, ZJB }, ! 121: { ZJB, 0, ZJB }, ! 122: ! 123: { 0, 0, 0 }, ! 124: { 0, 0, 0 }, ! 125: { ZNEG, ZSBB, 0 }, ! 126: { ZNOT, 0, 0 }, ! 127: { 0, 0, 0 }, ! 128: { 0, 0, 0 }, ! 129: { 0, 0, 0 }, ! 130: { ZADD, ZINC, ZADC }, ! 131: { ZSUB, ZDEC, ZSBB }, ! 132: { ZADD, ZINC, ZADC }, ! 133: { ZSUB, ZDEC, ZSBB }, ! 134: { 0, 0, 0 }, ! 135: { 0, 0, 0 }, ! 136: { 0, 0, 0 }, ! 137: { 0, 0, 0 }, ! 138: { 0, 0, 0 }, ! 139: { 0, 0, 0 }, ! 140: { 0, 0, 0 }, ! 141: { 0, 0, 0 }, ! 142: { ZMOV, ZSUB, 0 }, ! 143: { 0, 0, 0 }, ! 144: { 0, 0, 0 }, ! 145: { 0, 0, 0 }, ! 146: { 0, 0, 0 }, ! 147: { 0, 0, 0 }, ! 148: { 0, 0, 0 } ! 149: }; ! 150: ! 151: /* ! 152: * Per type info. ! 153: * Column 0 is function return register (-1 if never a return type). ! 154: * Column 1 is function return context, for select. ! 155: * Column 2 is size of a temp. ! 156: * Column 3 is the actual size in memory, for autoinc/autodec. ! 157: * Column 4 is bit set for searching pattern tables. ! 158: * Column 5 is register kind. ! 159: * Column 6 is register kind for a pair. ! 160: */ ! 161: PERTYPE pertype[] = { ! 162: /* REGNAME char char char TYPESET KIND KIND */ ! 163: /* p_frreg p_frcat p_size p_incr p_type p_kind p_pair */ ! 164: { AX, MRVALUE, 2, 1, FS8, KB, KL }, ! 165: { AX, MRVALUE, 2, 1, FU8, KB, KL }, ! 166: { AX, MRVALUE, 2, 2, FS16, KW, KL }, ! 167: { AX, MRVALUE, 2, 2, FU16, KW, KL }, ! 168: { DXAX, MRVALUE, 4, 4, FS32, KL, 0 }, ! 169: { DXAX, MRVALUE, 4, 4, FU32, KL, 0 }, ! 170: { -1, MRVALUE, 8, 8, FF32, 0, 0 }, ! 171: { FPAC, MRVALUE, 8, 8, FF64, KD, 0 }, ! 172: { -1, MRVALUE, 0, 0, FBLK, 0, 0 }, ! 173: { -1, MRVALUE, 0, 0, FFLD8, 0, 0 }, ! 174: { -1, MRVALUE, 0, 0, FFLD16, 0, 0 }, ! 175: { DXAX, MRVALUE, 4, 4, FLPTR, KLP, 0 }, ! 176: { DXAX, MRVALUE, 4, 4, FLPTB, KLP, 0 }, ! 177: { AX, MRVALUE, 2, 2, FSPTR, KSP, 0 }, ! 178: { AX, MRVALUE, 2, 2, FSPTB, KSP, 0 } ! 179: }; ! 180: ! 181: /* ! 182: * These tables adjust relational ops when the ! 183: * sense is reversed or when the subtrees are swapped. ! 184: */ ! 185: char fliprel[] = { ! 186: EQ, NE, LT, LE, GE, GT, ULT, ULE, UGE, UGT ! 187: }; ! 188: ! 189: char otherel[] = { ! 190: NE, EQ, LE, LT, GT, GE, ULE, ULT, UGT, UGE ! 191: }; ! 192: ! 193: /* ! 194: * Type table. ! 195: * Indexed by machine type. ! 196: * Used by type testing macros defined in cc1mch.h. ! 197: */ ! 198: char tinfo[] = { ! 199: 060, 064, /* S8, U8, */ ! 200: 022, 026, /* S16, U16, */ ! 201: 021, 025, /* S32, U32, */ ! 202: 010, 010, /* F32, F64, */ ! 203: 0100, /* BLK, */ ! 204: 060, /* FLD8, */ ! 205: 020, /* FLD16, */ ! 206: 0205, 0305, /* LPTR, LPTRB, */ ! 207: 0226, 0326 /* SPTR, SPTRB */ ! 208: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.