|
|
1.1 ! root 1: /* ! 2: * This file contains the machine ! 3: * specific definitions used by the direct to ! 4: * bits C compiler's final phase. This version is ! 5: * for the Intel 8086 (SMALL and LARGE). This is ! 6: * the new VAX base, including all edits up to ! 7: * revision 48. ! 8: */ ! 9: typedef unsigned short ADDRESS; ! 10: typedef short SIGNEDADDRESS; ! 11: ! 12: #define UNCON ZJMP ! 13: #define ischnrel(rel) (rel!=ZLOOP && rel!=ZLOOPE && rel!=ZLOOPNE && rel!=ZJCXZ) ! 14: #define isrevrel(rel) (rel!=ZJMP && rel!=ZLOOP && rel!=ZLOOPE && rel!=ZLOOPNE && rel!=ZJCXZ) ! 15: ! 16: /* ! 17: * These definitions are used in the ! 18: * opcode table. They tell the coder the style ! 19: * of the instruction. ! 20: */ ! 21: #define OF_BYTE 0 /* Byte data */ ! 22: #define OF_CALL 1 /* Direct call */ ! 23: #define OF_ICALL 2 /* Indirect call */ ! 24: #define OF_IN 3 /* In */ ! 25: #define OF_INH 4 /* Inherent (1 byte) */ ! 26: #define OF_INH2 5 /* One byte, 0x0A prefix */ ! 27: #define OF_INT 6 /* Interrupt */ ! 28: #define OF_JMP 7 /* Jumps */ ! 29: #define OF_LEA 8 /* Lea, lds, les */ ! 30: #define OF_REL 9 /* Jcxz, loops */ ! 31: #define OF_MUL 10 /* Mul and div */ ! 32: #define OF_MOV 11 /* Moves */ ! 33: #define OF_NRET 12 /* Return with pop of n */ ! 34: #define OF_OUT 13 /* Out */ ! 35: #define OF_POP 14 /* Pop */ ! 36: #define OF_PUSH 15 /* Push */ ! 37: #define OF_DOP 16 /* Double operand */ ! 38: #define OF_SHR 17 /* Shifts */ ! 39: #define OF_SOP 18 /* Single operand */ ! 40: #define OF_WORD 19 /* Word data */ ! 41: #define OF_XCALL 20 /* Cross segment calls */ ! 42: #define OF_DOPS 21 /* Double op, sw encoding valid */ ! 43: #define OF_FWAIT 22 /* FWAIT */ ! 44: #define OF_FRM 23 /* Floating point, uses standard address */ ! 45: #define OF_FD9 24 /* Single byte, D9 prefix */ ! 46: #define OF_FDE 25 /* Single byte, DE prefix */ ! 47: #define OF_LPTR 26 /* Local pointer (offset only) */ ! 48: #define OF_GPTR 27 /* Global pointer (segment and offset) */ ! 49: #define OF_FDD 28 /* Single byte, DD prefix */ ! 50: #define OF_MUL3 29 /* Multiply immediate, 3 operands */ ! 51: ! 52: #define is8087op(op) ((op)==OF_FWAIT||(op)==OF_FD9||(op)==OF_FDD||(op)==OF_FDE||(op)==OF_FRM) ! 53: ! 54: /* Flags */ ! 55: #define OP_BYTE 010 /* Byte instruction */ ! 56: #define OP_NPTR 020 /* No PTR in output */ ! 57: #define OP_DWORD 040 /* Dword instruction */ ! 58: ! 59: /* If !EMUFIXUPS, the routines outf[bw]() write an absolute 8087 op. */ ! 60: #if !EMUFIXUPS ! 61: #define outfb(b) outab(b) ! 62: #define outfw(w, pfx) outaw(w) ! 63: #endif ! 64: ! 65: /* ! 66: * Externals. ! 67: */ ! 68: extern int framesize; /* Size of frame */ ! 69:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.