Make your own free website on Tripod.com
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

x86instr.h

Go to the documentation of this file.
00001 /*
00002 PeRdr - PE file disassembler
00003 Copyright (C) 1999-2002 Frediano Ziglio
00004 -----
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 -----
00020 
00021 INFORMATION
00022   www: http://freddy77.tripod.com/perdr/
00023   e-mail: freddy77@angelfire.com
00024 */
00025 #ifndef FILE_X86INSTR_H
00026 #define FILE_X86INSTR_H
00027 
00028 #include "x86istr.h"
00029 #include "param.h"
00030 #include "registers.h"
00031 
00032 #include "references.h"
00033 
00034 class Instruction
00035 {
00036 public:
00037   struct UseTypeUnimplemented
00038   {
00039   public:
00040     UseTypeUnimplemented(enum x86instructions _instr):instr(_instr) {};
00041     enum x86instructions instr;
00042   };
00043   enum UseType {
00044     // tipo semplici
00045     useNone =0, useOverwrite =1, useModify =2, useRead =4,
00046     // tipi composti
00047     useReadWrite = useOverwrite|useRead, useReadModify = useModify|useRead,
00048     // maschere utili
00049     useMaskChange = useOverwrite|useModify
00050   };
00051         Instruction()
00052   {
00053         numArg = 0;
00054         instruction = -1;
00055         segOver = -1;
00056   };
00057   // calcola l'uso che si fa di un registro, se sovrascrittura param
00058   // conterra' il nuovo valore
00059   enum UseType GetUseType(reg_t reg,Param* param = NULL) const;
00060   void Write(char* buffer) const;
00061   void WriteRegUsage(FILE* f) const;
00062   enum FlowTypes GetFlowType() const;
00063         int instruction;
00064   int numArg;
00065   int segOver;
00066   Param Args[3];  // numero parametri massimi
00067 };
00068 
00069 #endif //FILE_X86INSTR_H

Generated on Mon Jan 13 22:20:34 2003 for perdr by doxygen1.2.15