home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oxcc1433.zip / SRC / OXANF.H < prev    next >
C/C++ Source or Header  |  1995-11-03  |  19KB  |  753 lines

  1. /* 
  2.     oxanf.h    -- v1.430 definition of architecture neutral format
  3.     
  4.     Copyright (c) 1995
  5.     Norman D. Culver dba
  6.     Oxbow Software
  7.     1323 S.E. 17th Street #662
  8.     Ft. Lauderdale, FL 33316
  9.     (305) 527-1663 Voice
  10.     (305) 760-7584 Fax
  11.     (305) 760-4679 Data
  12.     norman.culver@channel1.com
  13.     All rights reserved.
  14.  
  15.  * Redistribution and use in source and binary forms are permitted
  16.  * provided that: (1) source distributions retain this entire copyright
  17.  * notice and comment, and (2) distributions including binaries display
  18.  * the following acknowledgement:  ``This product includes software
  19.  * developed by Norman D. Culver dba Oxbow Software''
  20.  * in the documentation or other materials provided with the distribution
  21.  * and in all advertising materials mentioning features or use of this
  22.  * software.
  23.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  24.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  25.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  26.  
  27. */
  28.  
  29.  
  30. /* F_RETBITS */
  31. #define RET_VOID (0x01)
  32. #define RET_FLOAT (0x02)
  33. #define RET_STRUCT (0x04)
  34. #define RET_DOUBLE (0x08)
  35. #define RET_LDOUBLE (0x10)
  36. #define RET_UNSIGNED (0x20)
  37.  
  38. /* F_QUALBITS */
  39. #define QUAL_NEAR (0x01)
  40. #define QUAL_FAR (0x02)
  41. #define QUAL_SEG16 (0x04)
  42. #define QUAL_FAR16 (0x08)
  43. #define QUAL_ELLIPSIS (0x10)
  44. #define QUAL_CONST (0x20)
  45. #define QUAL_VOLATILE (0x40)
  46.  
  47. /* address types in 'atype' for gen_code */
  48. #define A_VALUE (0x0001)
  49. #define A_POINTER (0x0002)
  50. #define A_MEMADDR (0x0004)
  51. #define A_IMMED (0x0008)
  52. #define A_ABSOLUTE (0x0010)
  53. #define A_TEMP (0x0020)
  54. #define A_DATA (0x0040)
  55. #define A_AUTO (0x0080)
  56. #define A_EXTERN (0x0100)
  57. #define A_GLOBAL (0x0200)
  58. #define A_RET (0x0400)
  59. #define A_NOALIAS (0x0800)
  60. #define A_PARAM (0x1000)
  61.  
  62. /* data types in 'dtype'(low 8 bits) for gen_code */
  63. #define D_SIGNED (0x0000)
  64. #define D_UNSIGNED (0x0001)
  65. #define D_FLOAT (0x0002)
  66. #define D_POINTER (0x0003)
  67. #define D_ARRAY (0x0004)
  68. #define D_STRUCT (0x0005)
  69. #define D_FUNCTION (0x0006)
  70. #define D_FUNCPTR (0x0007)
  71. #define D_SEGMENT (0x0008)
  72.  
  73. /* data qualifiers in `dtype' (high 8 bits) for gen_code */
  74. #define Q_NEAR    (0x01)
  75. #define Q_FAR    (0x02)
  76. #define Q_HUGE    (0x04)
  77. #define Q_CONST    (0x08)
  78. #define Q_VOLAT (0x10)
  79. #define Q_SEG16    (0x20)
  80. #define Q_FAR16    (0x40)
  81. #define Q_BASED    (0x80)
  82.  
  83. /* in the opcode 3 address ids */
  84. #define OPIMMED1 (0x00)    /* signed integer type */
  85. #define OPIMMED2 (0x20)    /* unsigned integer type */
  86. #define OPIMMED3 (0x40) /* float type */
  87. #define OPIMMED4 (0x60) /* pointer type */
  88. #define OPTEMP (0x80)
  89. #define OPRET (0xa0)
  90. #define OPAUTO (0xc0)
  91. #define OPDATA (0xe0)
  92.  
  93. /* HARWARE TYPES */
  94. #define INTEL8616 'i'
  95. #define INTEL8632 'I'
  96. #define POWER_PC 'P'
  97. #define DEC_ALPHA 'D'
  98. #define PA_RISC 'H'
  99. #define MIPS_3000 'm'
  100. #define MIPS_4000 'M'
  101.  
  102. /* GENCODE TYPE */
  103. #define MACHINE_CODE 'm'
  104. #define SOURCE_CODE 's'
  105. #define BYTE_CODE 'b'
  106. #define RIP_CODE 'r'
  107. #define DEBUG_CODE 'd'
  108. #define ANF_CODE 'n'
  109. #define ASSEMBLER_CODE 'a'
  110.  
  111. /* OPERATING SYSTEM TYPES */
  112. #define DOS16PLAT 'd'
  113. #define DOS32PLAT 'D'
  114. #define WIN16PLAT 'w'
  115. #define WIN32sPLAT 'W'
  116. #define WIN32gPLAT 'C'
  117. #define WINntPLAT 'N'
  118. #define OS216PLAT 'o'
  119. #define OS232PLAT 'O'
  120. #define UNIXVPLAT 'U'
  121. #define LINUXPLAT 'L'
  122.  
  123. /* TARGET DEBUGGER INFO */
  124. #define CODEVBUG 'v'
  125. #define WATCBUG 'w'
  126. #define BORLBUG 'b'
  127. #define GDBBUG 'g'
  128. #define DWARF 'd'
  129.  
  130. /* TARGET ASSEMBLER INFO */
  131. #define UNIX 'u'
  132. #define GAS 'g'
  133. #define MASM 'm'
  134. #define TASM 't'
  135.  
  136. /* MEMORY MODELS */
  137. #define MODTINY 't'
  138. #define MODSMALL 's'
  139. #define MODMEDIUM 'm'
  140. #define MODLARGE 'l'
  141. #define MODCOMPACT 'c'
  142. #define MODHUGE 'h'
  143. #define MODFLAT 'x'
  144.  
  145. /* OBJECT FILE FORMATS */
  146. #define OMF16FORMAT 'o'
  147. #define OMF32FORMAT 'O'
  148. #define PHARLAPFORMAT 'P'
  149. #define WATCOM32FORMAT 'W'
  150. #define BORLAND32FORMAT 'B'
  151. #define AOUTFORMAT 'a'
  152. #define COFFFORMAT 'c'
  153. #define ELFFORMAT 'e'
  154.  
  155. #if NEED_FUNCTHUNK
  156.  
  157. /* FUNCTHUNK CONTENTS */
  158.  
  159. /* F_MODS */
  160. #define Fretvoid (0x0001)
  161. #define Fretflt (0x0002)
  162. #define Fretstr (0x0004)
  163. #define Fretdbl  (0x0008)
  164. #define Fretldbl (0x0010)
  165. #define Fbuiltin (0x0020)
  166. #define Funused1 (0x0040)
  167. #define Funused2 (0x0080)
  168. #define Fnear     (0x0100)
  169. #define Ffar     (0x0200)
  170. #define Fseg16  (0x0400)
  171. #define Ffar16  (0x0800)
  172. #define Fellipsis (0x1000)
  173. #define Fthunked (0x2000)
  174. #define Fnested (0x4000)
  175. #define Fextern (0x8000)
  176.  
  177. typedef struct _functhunk {/* 16 bytes */
  178.     long funcaddr;
  179.     unsigned short stksiz;
  180.     unsigned short argsiz;
  181.     unsigned short stkbeg;
  182.     unsigned short fmods;
  183.     unsigned short retsiz;
  184.     unsigned short maxes;
  185. } *Pft;
  186.  
  187. typedef union _datum { /* 16 bytes */
  188. #if SUPPORT_LONG_LONG
  189.     unsigned long long Uulonglong;
  190.     long long        Ulonglong;
  191. #endif
  192.     unsigned char    Uuchar;
  193.     char            Uchar;
  194.     unsigned short    Uushort;
  195.     short            Ushort;
  196.     unsigned int    Uuint;
  197.     int                Uint;
  198.     unsigned long    Uulong;
  199.     long            Ulong;
  200.     void *            Upointer;
  201.     float            Ufloat;
  202.     double            Udouble;
  203. #if SUPPORT_LONG_DOUBLE
  204.     long double        Ulongdouble;
  205. #endif
  206.     struct {
  207.         char d[16];
  208.     } chr;
  209.     struct {
  210.         unsigned char d[16];
  211.     } uchr;
  212.     struct {
  213.         short d[8];
  214.     } shrt;
  215.     struct {
  216.         unsigned short d[8];
  217.     } ushrt;
  218.     struct {
  219.         long d[4];
  220.     } lng;
  221.     struct {
  222.         unsigned long d[4];
  223.     } ulng;
  224. #if SUPPORT_LONG_LONG
  225.     struct {
  226.         long long d[2];
  227.     } lnglng;
  228.     struct {
  229.         unsigned long long d[2];
  230.     } ulnglng;
  231. #endif
  232.     struct {
  233.         void *d[4];
  234.     } ptr;
  235. } DATUM;
  236. #endif /* NEED_FUNCTHUNK */
  237.  
  238. #ifdef NEED_ANFDEFS
  239. enum basedecls {/* 1-21 */
  240.     bd_array = 1, bd_struct, bd_union, bd_function, bd_funcptr,
  241.     bd_pointer, bd_uchar, bd_ushort, bd_uint, bd_ulong,
  242.     bd_ulonglong, bd_float, bd_longdouble, bd_double, bd_char,
  243.     bd_short, bd_int, bd_long, bd_longlong, bd_void,
  244.     bd_segment
  245. };
  246.  
  247. typedef struct op {
  248.     unsigned char op;
  249.     unsigned char a1;
  250.     unsigned char a2;
  251.     unsigned char a3;
  252.     unsigned char *next;
  253.     long data;
  254.     long data1;
  255.     short data2;
  256.     unsigned short data3;
  257.     long data4;                /* perhaps skip to data in next area */
  258.     long data5;                /* NODEP in functhunk */
  259.     long data5a;            /* ARGSIZ|STKSIZ in functhunk */
  260.     unsigned short data6;    /* STKBEG in functhunk */
  261.     unsigned short data7;    /* F_MODS in functhunk */
  262.     unsigned short data8;    /* F_RETSIZ in functhunk */
  263.     unsigned short data9;    /* MAXES in functhunk */
  264. } *Pop;
  265. #define POP ((Pop)p)
  266.  
  267. typedef union opD {
  268.     unsigned char    Uuchar;
  269.     char            Uchar;
  270.     unsigned short    Uushort;
  271.     short            Ushort;
  272.     unsigned int    Uuint;
  273.     int                Uint;
  274.     unsigned long    Uulong;
  275.     long            Ulong;
  276.     void *            Upointer;
  277.     float            Ufloat;
  278.     double            Udouble;
  279. #if SUPPORT_LONG_LONG
  280.     unsigned long long Uulonglong;
  281.     long long        Ulonglong;
  282. #else
  283.     long            Ulonglong[2];
  284.     unsigned long    Uulonglong[2];
  285. #endif
  286. #if SUPPORT_LONG_DOUBLE
  287.     long double        Ulongdouble;
  288. #endif
  289. } opD, *PopD;
  290.  
  291. typedef struct opR {
  292.     unsigned short dtype;
  293.     unsigned short atype;
  294.     long dsize;
  295. } *PopR;
  296.  
  297. typedef struct opT {
  298.     unsigned short dtype;
  299.     unsigned short atype;
  300.     long dsize;
  301.     long tmpnum;
  302. } *PopT;
  303.  
  304. typedef struct opA {
  305.     unsigned short dtype;
  306.     unsigned short atype;
  307.     long dsize;
  308.     long offset;
  309.     unsigned short declnum;
  310.     short symnum;
  311.     long pofs;    /* autovars only */
  312. } *PopA;
  313. #define POPA ((PopA)(p+inc))
  314.  
  315. typedef struct _inst {
  316.     PopA lptr;
  317.     PopA rptr;
  318.     PopA dptr;
  319.     unsigned char loptype;
  320.     unsigned char roptype;
  321.     unsigned char doptype;
  322. } INST, *PINST;
  323.  
  324. typedef union opI {
  325.     struct  {
  326.         unsigned long total_size;
  327.         unsigned long thunk_offset;
  328.         unsigned long bss_offset;
  329.     } dat;
  330.     struct  {
  331.         unsigned long size;
  332.         unsigned long offset;
  333.         short symnum;
  334.         unsigned short declnum;
  335.         short segid;
  336.         unsigned short dtype;
  337.     } s;
  338.     struct {
  339.         unsigned short declnum;
  340.         unsigned short basedecl;
  341.     } dcl;
  342.     struct {
  343.         unsigned long swdefault;
  344.         unsigned long swnode;
  345.     } swt;
  346.     struct {
  347.         long argsize;
  348.         long bits;
  349.         long retbits;
  350.     } fc;
  351.     struct {
  352.         unsigned long size;
  353.         unsigned long offset;
  354.     } rs;
  355.     struct {
  356.         unsigned long argloc;
  357.         unsigned long argsize;
  358.     } arg;
  359.     struct {
  360.         unsigned long arysize;
  361.         unsigned long elemsize;
  362.         unsigned long dims1;
  363.         unsigned short dcnt;
  364.         unsigned short declnum;
  365.     } ary;
  366.     struct {
  367.         unsigned long dims[4];
  368.     } ary1;
  369.     struct {
  370.         unsigned short parms[8];
  371.     } parm;
  372.     struct {
  373.         unsigned short prmcnt;
  374.         unsigned short fmods;
  375.         unsigned short quals;
  376.         unsigned short declnum;
  377.         unsigned short parmnum;
  378.         short symnum;
  379.     } funcd;
  380.     struct {
  381.         unsigned char numptrs;
  382.         unsigned char hassegs;
  383.         unsigned char quals[8];
  384.         unsigned short declnum;
  385.     } ptrinf;
  386.     struct {
  387.         unsigned short seg[8];
  388.     } seginf;
  389.     struct {
  390.         unsigned char tfofs;
  391.         unsigned char fsize;
  392.         unsigned char type;
  393.         unsigned char pad;
  394.     } bfinf;
  395.     struct {
  396.         unsigned long membercnt;
  397.         unsigned long susize;
  398.         short symnum;
  399.         unsigned short quals;
  400.     } suinf;
  401.     struct {
  402.         unsigned short memdcl[8];
  403.     } sum;
  404.     struct {
  405.         unsigned long offset;
  406.         short symnum;
  407.         unsigned short declnum;
  408.         unsigned short cdeclnum;    /* container_declnum */
  409.         unsigned char fieldofs;        /* bitfields only */
  410.         unsigned char fieldsiz;
  411.     } memb;
  412.     struct {
  413.         unsigned short major;
  414.         unsigned short minor;
  415.         char code_format;
  416.         char target_hardware;
  417.         char target_debugger;
  418.         char target_os;
  419.         char memory_model;
  420.         char obj_format;
  421.         char target_assembler;
  422.         char pads[4];
  423.         char opt_level;
  424.     } hdr;
  425.     struct {
  426.         long symnum;
  427.         unsigned long hidden_offset;
  428.         unsigned long argsize;
  429.         short segid;
  430.         unsigned short tempmax;
  431.     } funcdef;
  432.     struct {
  433.         long tempmax;
  434.     } funcexit;
  435.     struct {
  436.         unsigned long v1;
  437.         unsigned long v2;
  438.         unsigned long v3;
  439.         short segid;
  440.         short unused;
  441.     } segdef;
  442.     struct {
  443.         unsigned long spot;
  444.         short rsym;
  445.         short rsize;
  446.         unsigned long base;
  447.         long offset;
  448.     } reloc;
  449.     struct {
  450.         long line;
  451.         long filenamenum;
  452.     } line;
  453.     struct {
  454.         long label;
  455.     } jmp;
  456.     struct {
  457.         unsigned char shift;
  458.         unsigned char size;
  459.         unsigned char sign;
  460.     } bfield;
  461. } *PopI;
  462. #define POPI ((PopI)(p+8))
  463. #define DATI (POPI->s)
  464.  
  465. typedef struct _nd
  466. {
  467.     unsigned char dtype;
  468.     unsigned char quals;
  469.     unsigned char opsize;
  470.     unsigned char flags;
  471.     long size;
  472.     DATUM *data;
  473.     unsigned short atype;
  474. } ND, *PND;
  475.  
  476. #define OFFSET data->ulng.d[2]
  477. #define DECLNUM data->ushrt.d[6]
  478. #define SYMNUM data->shrt.d[7]
  479. #define TMPNUM data->ulng.d[2]
  480. #define POFS data->ulng.d[4]
  481. #define ARGSIZE data->ulng.d[1]
  482. #define ARGOFS data->ulng.d[0]
  483.  
  484. #endif /* NEED_ANFDEFS */
  485.  
  486. enum genopcodes {nilop=0,
  487. /*01 -- instructions */
  488.     assignop=1,plusop,minusop,mulop,divop,
  489.     lshop,rshop,modop,orop,xorop,
  490.  
  491. /*11*/
  492.     andop,eqop,neqop,ltop,gtop,
  493.     leop,geop,negop,complop,notop,
  494.  
  495. /*21*/
  496.     copyop,clrdatop,truthop,jmptrueop,jmpfalseop,
  497.     jmpgotoop,nopop,callop,retvoidop,ljmptrueop,
  498.  
  499. /*31*/ ljmpfalseop,
  500.  
  501. /*41*/
  502.     pushop=41,popop,functionop,emitop,signxtdop,
  503.  
  504. /*64 */
  505.     jmploopop=64,jmpcontinueop,jmpbreakop,regainop,retstructop,
  506.     retdataop,grabop,switchop,argop,callfuncop,
  507.  
  508. /*74*/
  509.     compsavop,getbitfieldop,putbitfieldop,aliastmpop,castop,
  510.     funcstartop,funcstopop,
  511.  
  512. /*84 -- address temp creators */
  513.     duptmpop=84,derefop,getvalop,totmpop,
  514.  
  515. /*101 -- statements */
  516.     labelop=101,gfuncdefop,sfuncdefop,nestedfuncdefop,funcexitop,
  517.     nestedfuncexitop,expstmtop,ifstmtop,ifelsestmtop,switchstmtop,
  518.  
  519. /*111*/
  520.     whilestmtop,dostmtop,forstmtop,asmstmtop,initstmtop,
  521.     lineop,
  522.  
  523. /*131 -- expressions */
  524.     condop=131,twopathop,logicalop,binopop,strelemop,
  525.     ptrelemop,arrayelemop,arraydimsop,ptrdimsop,funcallop,
  526.  
  527. /*141*/
  528.     argloadop,preincrdecop,compoundop,postincrdecop,unopop,
  529.  
  530. /*161 -- info */
  531.     symbop=161,casevalop,caserangeop,switchidop,    
  532.     headerop,trailerop,declop,ptrinfop,maxtempop,
  533.  
  534. /*171*/
  535.     memberinfop,arrayinfop,structinfop,funcptrinfop,funcinfop,
  536.     paraminfop,bfieldinfop,symoffsetop,symblockop,dataop,
  537.  
  538. /*181*/
  539.     datablockop,mallocblockop,thunkblockop,bssblockop,glodatop,
  540.     globssop,glofuncop,extvarop,extfuncop,relocop,
  541.     stringblockop,
  542. /*192*/
  543.     segdefop,anfblockop,extlocop,endfileop,endallop,
  544.     endop
  545. }; 
  546.  
  547. #ifdef NEED_GENOPS
  548. /* ARRAY OF STRINGS FOR PRINTING THE ENUMERATED OPCODES ABOVE, IT MUST MATCH */
  549. /* PSEUDO ASSEMBLY LANGUAGE (anf) CODES MAY BE ADDED IN SLOTS 31-63 AND
  550.     WILL AUTOMATICALLY BE UNDERSTOOD BY `oxcc' */
  551.  
  552. char *oxgenops[] = {"<nil>",
  553. /*01 -- instructions */
  554.     "mov", "add", "sub", "mul", "div", 
  555.     "lsh", "rsh", "mod", "or", "xor",
  556.  
  557. /*11*/
  558.     "and", "eq", "neq", "lt", "gt",
  559.     "le", "ge", "neg","compl","not",
  560.  
  561. /*21*/
  562.     "copydat","clrdat","truthof","jmptrue","jmpfalse",
  563.     "jmp","nop","call","ret","ljmptrue",
  564.  
  565. /*31*/
  566.     "ljmpfalse","","","","",
  567.     "","","","","",
  568.  
  569. /*41 -- codes 41 to 63 not understood by bytecode generator `oxccb' */
  570. /*        ADD NEW CODES FOR __anf__ BLOCKS HERE, NO NEED TO ENUMERATE ABOVE. */
  571.     "push","pop","function","emit","signxtd",
  572.     "","","","","",
  573.  
  574. /*51*/
  575.     "","","","","",
  576.     "","","","","",
  577.  
  578. /*61*/
  579.     "","","",
  580.  
  581. /*64 -- codes 64 to 100 generated only by oxcc */
  582.     "jmploop","jmpcontinue","jmpbreak","regain","retstruct",
  583.     "retdata","grab","switch","arg","call-c",
  584.  
  585. /*74*/
  586.     "compsave","getbitfield","putbitfield","aliastmp","cast",
  587.     "funcstart","funcstop","","","",
  588.  
  589. /*84*/
  590.     "duptmp","deref","getval","totmp","",
  591.     "","","","","",
  592.  
  593. /*94*/
  594.     "","","","","",
  595.     "","",
  596.  
  597. /*101 -- statements */
  598.     "Label","GFuncdef","SFuncdef","NestedFuncdef","Funcexit",
  599.     "NestedFuncexit","ExpS","If","IfElse","Switch",
  600.  
  601. /*111*/
  602.     "While","Do","For","Asm","Init",
  603.     "#Line","","","","",
  604.  
  605. /*121*/
  606.     "","","","","",
  607.     "","","","","",
  608.  
  609. /*131 -- expressions */
  610.     "Conditional","TwoPath","Logical","Binop","StrElem",
  611.     "Ptrelem","ArrayElem","ArrayDim","PtrDim","FuncCall",
  612.  
  613. /*141*/
  614.     "ArgLoad","Pre++--","Compound","Post++--","Unop",
  615.     "","","","","",
  616.  
  617. /*151*/
  618.     "","","","","",
  619.     "","","","","",
  620.  
  621. /*161 -- info */
  622.     "Symbols","CaseVal","CaseRange","SwitchId",
  623.     "Header","Trailer","Decl","PtrInfo","MaxTemp",
  624.  
  625. /*171*/
  626.     "Member","ArrayInfo","StructInfo","FuncPtrInfo","FuncInfo",
  627.     "ParamInfo","BitfieldInfo","SymOffset","SymBlock","Data",
  628.  
  629. /*181*/
  630.     "DataBlock","MallocBlock","ThunkBlock","BssBlock","Glodat",
  631.     "Globss","Glofunc","Extvar","Extfunc","Reloc",
  632.     "StringBlock",
  633.  
  634. /*192*/
  635.     "SegDef","AnfBlock","Extloc","EndFile","EndAll",
  636.     "End"
  637. };
  638. #else
  639. extern char *oxgenops[];
  640. #endif /* NEED_GENOPS */
  641.  
  642. #if NEED_ASM_OPCODES
  643. static char *x86opcodes[] = {        
  644.   "aaa","aad","aam","aas",
  645.   "adc","adcb","adcw","adcl",
  646.   "add","addb","addw","addl",
  647.   "and","andb","andw","andl",
  648.   "arpl",
  649.   "bound","boundw","boundl",
  650.   "bsf","bsfw","bsfl",
  651.   "bsr","bsrw","bsrl",
  652.   "bt","btw","btl",
  653.   "btc","btcw","btcl",
  654.   "btr","btrw","btrl",
  655.   "bts","btsw","btsl",
  656.   "call","cbw","cwde","clc","cld","cli","clts","cmc",
  657.   "cmp","cmpb","cmpw","cmpl",
  658.   "cmps","cmpsb","cmpsw","cmpsd","cmpsl",
  659.   "cwd","cdq","daa","das",
  660.   "dec","decb","decw","decl",
  661.   "div","divb","divw","divl",
  662.   "enter","hlt",
  663.   "idiv","idivb","idivw","idivl",
  664.   "imul","imulb","imulw","imull",
  665.   "in","inb","inw","inl",
  666.   "inc","incb","incw","incl",
  667.   "ins","insb","insw","insd","insl",
  668.   "int","into","iret","iretd",
  669.   "ja","jae","jb","jbe","jc","jcxz","jecxz","je","jz","jg","jge","jl","jle",
  670.   "jna","jnae","jnb","jnbe","jnc","jne","jng","jnge","jnl","jnle","jno","jnp",
  671.   "jns","jnz","jo","jp","jpe","jpo","js","jz","jmp",
  672.   "lea","leaw","leal",
  673.   "leave","lgdt","lidt","lgs","lss","lds","les","lfs","lldt","lmsw","lock",
  674.   "lods","lodsb","lodsw","lodsd","lodsl",
  675.   "loop","loope","loopz","loopne","loopnz",
  676.   "lsl","lslw","lsll",
  677.   "ltr",
  678.   "mov","movb","movw","movl",
  679.   "movs","movsb","movsw","movsd","movsl",
  680.   "movsx","movsxb","movsxw",
  681.   "movzx","movzxb","movzxw",
  682.   "mul",
  683.   "neg","negb","negw","negl",
  684.   "nop",
  685.   "not","notb","notw","notl",
  686.   "or","orb","orw","orl",
  687.   "out","outb","outw","outl",
  688.   "outs","outsb","outsw","outsd","outsl",
  689.   "pop","popw","popl",
  690.   "popa","popaw","popad","popal",
  691.   "popf","popfw","popfd","popfl",
  692.   "push","pushw","pushl",
  693.   "pusha","pushad","pushal",
  694.   "pushf","pushfd","pushfl",
  695.   "rcl","rclb","rclw","rcll",
  696.   "rcr","rcrb","rcrl",
  697.   "ror","rorw","rorl",
  698.   "rol","rolb","rolw","roll",
  699.   "rep","repe","repz","repne","repnz",
  700.   "ret","retn",
  701.   "sahf",
  702.   "sal","salb","salw","sall",
  703.   "sar","sarb","sarw","sarl",
  704.   "shl","shlb","shlw","shll",
  705.   "shr","shrb","shrw","shrl",
  706.   "sbb","sbbb","sbbw","sbbl",
  707.   "scas","scasb","scasw","scasd","scasl",
  708.   "seta","setae","setb","setbe","setc","sete","setg","setge","setl","setle",
  709.   "setna","setnae","setnb","setnbe","setnc","setne","setng","setnge","setnl",
  710.   "setnle","setno","setnp","setns","setnz","seto","setp","setpe","setpo",
  711.   "sets","setz","sgdt","sidt",
  712.   "shld",
  713.   "shrd",
  714.   "sldt","smsw","stc","std","sti",
  715.   "stos","stosb","stosw","stosd","stosl",
  716.   "str",
  717.   "sub","subb","subw","subl",
  718.   "test","testb","testw","testl",
  719.   "verr","verrw",
  720.   "wait",
  721.   "xchg","xchgb","xchgw","xchgl",
  722.   "xlat","xlatb",
  723.   "xor","xorb","xorw","xorl",
  724.  
  725.   "fabs","fadd","fadds","faddl","faddp","fbld","fbstp","fchs","fclex",
  726.   "fnclex","fcom","fcoms","fcoml","fcomp","fcomps","fcompl","fcompp","fcos",
  727.   "fdecstp","fdisi","fndisi","fdiv","fdivs","fdivl","fdivp","fdivr","fdivrs",
  728.   "fdivrl","fdivrp","feni","fneni","ffree","fiadd","fiaddw","fiadds","ficom",
  729.   "ficomw","ficoms","ficomp","ficompw","ficomps","fidiv","fidivw","fidivs",
  730.   "fidivr","fidivrw","fidivrs","fild","fildw","filds","fildl","fimul","fimulw",
  731.   "fimuls","fincstp","finit","fininit","fist","fistw","fists","fistp","fistpw",
  732.   "fistps","fistpl","fisub","fisubw","fisubs","fisubr","fisubrw","fisubrs",
  733.   "fld","fldw","flds","fldl","fldcw","fldenv","fldlg2","fldln2","fldl2e",
  734.   "fldl2t","fldpi","fldz","fld1","fmul","fmuls","fmull","fmult","fmulp",
  735.   "fnop","fpatan","fprem","fprem1","fptan","frndint","frstor","fsave",
  736.   "fnsave","fscale","fsetpm","fsin","fsincos","fsqrt","fst","fsts","fstl",
  737.   "fstcw","fnstcw","fsetenv","fnsetenv","fstp","fstps","fstpl","fstpt",
  738.   "fstsw","fnstsw","fsub","fsubs","fsubl","fsubp","fsubr","fsubrs","fsubrl",
  739.   "fsubrp","ftst","fucom","fucomp","fucompp","fwait","fxam","fxch","fxtract",
  740.   "fyl2x","fyl2xpi","f2xmi",
  741.   0
  742. };
  743. static char *x86words[] = {
  744.   "ah","al","bh","bl","ch","cl","dh","dl","ax","bx","cx","dx","ds","es","ss",
  745.   "fs","gs","si","di","bp","sp","eax","ebx","ecx","edx","esi","edi","ebp","esp",
  746.   "LENGTH","TYPE","SIZE","BYTE","TBYTE","WORD","DWORD","FWORD","QWORD","PTR",
  747.   "OFFSET","EVEN","ALIGN","NEAR","FAR","SHORT","HIGH","LOW","SEG",
  748.   "length","size","type","byte","tbyte","word","dword","fword","qword","ptr",
  749.   "offset","even","align","near","far","short","high","low","seg",
  750.   0
  751. };
  752. #endif /* NEED_ASM_OPCODES */
  753.