Annotation of coherent/b/bin/c/h/i386/cc2mch.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * h/i386/cc2mch.h
                      3:  * Machine specific definitions for final phase
                      4:  * of direct to bits C compiler (cc2).
                      5:  * i386.
                      6:  */
                      7: 
                      8: #define        UNCON   ZJMP
                      9: #define        ischnrel(rel) (rel!=ZLOOP && rel!=ZLOOPE && rel!=ZLOOPNE && rel!=ZJCXZ)
                     10: #define        isrevrel(rel) (rel!=ZJMP && rel!=ZLOOP && rel!=ZLOOPE && rel!=ZLOOPNE && rel!=ZJCXZ)
                     11: 
                     12: /*
                     13:  * These definitions are used in the opcode table.
                     14:  * They tell the coder the style of the instruction.
                     15:  */
                     16: #define        OF_BYTE         0               /* Byte data                    */
                     17: #define        OF_CALL         1               /* Direct call                  */
                     18: #define        OF_ICALL        2               /* Indirect call                */
                     19: #define        OF_IN           3               /* In                           */
                     20: #define        OF_INH          4               /* Inherent (1 byte)            */
                     21: #define        OF_INH2         5               /* One byte, 0x0A prefix        */
                     22: #define        OF_INT          6               /* Interrupt                    */
                     23: #define        OF_JMP          7               /* Jumps                        */
                     24: #define        OF_LEA          8               /* Lea, lds, les                */
                     25: #define        OF_REL          9               /* Jcxz, loops                  */
                     26: #define        OF_MUL          10              /* Mul and div                  */
                     27: #define        OF_MOV          11              /* Moves                        */
                     28: #define        OF_NRET         12              /* Return with pop of n         */
                     29: #define        OF_OUT          13              /* Out                          */
                     30: #define        OF_POP          14              /* Pop                          */
                     31: #define        OF_PUSH         15              /* Push                         */
                     32: #define        OF_DOP          16              /* Double operand               */
                     33: #define        OF_SHR          17              /* Shifts                       */
                     34: #define        OF_SOP          18              /* Single operand               */
                     35: #define        OF_WORD         19              /* Word data                    */
                     36: #define        OF_XCALL        20              /* Cross segment calls          */
                     37: #define        OF_DOPS         21              /* Double op, sw encoding valid */
                     38: #define        OF_FWAIT        22              /* FWAIT                        */
                     39: #define        OF_FRM          23              /* Floating point, standard address */
                     40: #define        OF_FD9          24              /* Single byte, D9 prefix       */
                     41: #define        OF_FDE          25              /* Single byte, DE prefix       */
                     42: #define        OF_LPTR         26              /* Local pointer (offset only)  */
                     43: #define        OF_GPTR         27              /* Global pointer (segment and offset) */
                     44: #define        OF_FDD          28              /* Single byte, DD prefix       */
                     45: #define        OF_MUL3         29              /* Multiply immediate, 3 operands */
                     46: #define        OF_2B           30              /* Two-byte, 0F prefix          */
                     47: #define        OF_LONG         31              /* Long data                    */
                     48: 
                     49: #define        is8087op(op)    ((op)==OF_FWAIT||(op)==OF_FD9||(op)==OF_FDD||(op)==OF_FDE||(op)==OF_FRM)
                     50: 
                     51: /* Flags.  Watch out for OP_JUMP etc. defined in h/cc2.h. */
                     52: #define        OP_BYTE         0010            /* Byte instruction     */
                     53: #define        OP_WORD         0020            /* Word instruction     */
                     54: #define        OP_DWORD        0040            /* Dword instruction    */
                     55: #define        OP_NPTR         0100            /* No PTR in output     */
                     56: 
                     57: /* If !EMUFIXUPS, the routines outf[bw]() write an absolute 8087 op. */
                     58: #if    !EMUFIXUPS
                     59: #define        outfb(b)        outab(b)
                     60: #define        outfw(w, pfx)   outaw(w)
                     61: #endif
                     62: 
                     63: /* Shorthand. */
                     64: #define        af_p(ip, n)     (&((ip)->i_af[n]))
                     65: #define        MOD(afp)        (((afp)->a_mode) & A_AMOD)
                     66: #define        REGM(afp)       (((afp)->a_mode) & A_REGM)
                     67: #define        MODRM(afp)      (((afp)->a_mode) & (A_AMOD|A_REGM))
                     68: 
                     69: /*
                     70:  * Externals.
                     71:  */
                     72: extern ival_t  framesize;              /* Size of frame        */
                     73: extern PREGSET usedregs;               /* Registers used       */
                     74: extern int     hasfloat;               /* -VNDP fp code used   */
                     75: 
                     76: /* end of h/i386/cc2mch.h */

unix.superglobalmegacorp.com

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