PentiumFrontEnd Class Reference

#include <frontend/pentiumfrontend.h>

Inheritance diagram for PentiumFrontEnd:

FrontEnd List of all members.

Detailed Description

Definition at line 16 of file pentiumfrontend.h.

Public Member Functions

virtual std::vector< Exp * > & getDefaultParams ()
virtual std::vector< Exp * > & getDefaultReturns ()
virtual platform getFrontEndId ()
virtual ADDRESS getMainEntryPoint (bool &gotMain)
 PentiumFrontEnd (BinaryFile *pBF, Prog *prog, BinaryFileFactory *pbff)
virtual bool processProc (ADDRESS uAddr, UserProc *pProc, std::ofstream &os, bool frag=false, bool spec=false)
virtual ~PentiumFrontEnd ()

Protected Member Functions

virtual DecodeResultdecodeInstruction (ADDRESS pc)
virtual void extraProcessCall (CallStatement *call, std::list< RTL * > *BB_rtls)

Private Member Functions

void bumpRegisterAll (Exp *e, int min, int max, int delta, int mask)
void emitSet (std::list< RTL * > *pRtls, std::list< RTL * >::iterator &itRtl, ADDRESS uAddr, Exp *pLHS, Exp *cond)
unsigned fetch4 (unsigned char *ptr)
bool helperFunc (ADDRESS dest, ADDRESS addr, std::list< RTL * > *lrtl)
bool isAssignFromTern (Statement *s)
bool isDecAh (RTL *r)
bool isSetX (Statement *e)
bool isStoreFsw (Statement *s)
void processFloatCode (PBB pBB, int &tos, Cfg *pCfg)
void processFloatCode (Cfg *pCfg)
void processOverlapped (UserProc *proc)
void processStringInst (UserProc *proc)
bool processStsw (std::list< RTL * >::iterator &rit, std::list< RTL * > *pRtls, PBB pBB, Cfg *pCfg)
void State25 (Exp *pLHS, Exp *pRHS, std::list< RTL * > *pRtls, std::list< RTL * >::iterator &rit, ADDRESS uAddr)

Private Attributes

int idPF

Constructor & Destructor Documentation

PentiumFrontEnd::PentiumFrontEnd BinaryFile pBF,
Prog prog,
BinaryFileFactory pbff

Definition at line 570 of file pentiumfrontend.cpp.

References FrontEnd::decoder, and FrontEnd::prog.

PentiumFrontEnd::~PentiumFrontEnd  )  [virtual]

Definition at line 41 of file testStmtStubs.cpp.

Member Function Documentation

void PentiumFrontEnd::bumpRegisterAll Exp e,
int  min,
int  max,
int  delta,
int  mask

Definition at line 141 of file pentiumfrontend.cpp.

References Exp::doSearch(), opWild, Location::regOf(), and Const::setInt().

DecodeResult & PentiumFrontEnd::decodeInstruction ADDRESS  pc  )  [protected, virtual]

Reimplemented from FrontEnd.

Definition at line 1007 of file pentiumfrontend.cpp.

References RTL::appendStmt(), FrontEnd::decoder, Prog::getLibraryProc(), NJMCDecoder::getRTLDict(), NCT, DecodeResult::numBytes, FrontEnd::pBF, FrontEnd::prog, BinaryFile::readNative1(), DecodeResult::reDecode, RTLInstDict::RegMap, Location::regOf(), DecodeResult::reset(), DecodeResult::rtl, CallStatement::setDestProc(), DecodeResult::type, and DecodeResult::valid.

void PentiumFrontEnd::emitSet std::list< RTL * > *  pRtls,
std::list< RTL * >::iterator &  itRtl,
Exp pLHS,
Exp cond

Definition at line 460 of file pentiumfrontend.cpp.

References RTL::appendStmt(), and opTern.

void PentiumFrontEnd::extraProcessCall CallStatement call,
std::list< RTL * > *  BB_rtls
[protected, virtual]

Reimplemented from FrontEnd.

Definition at line 1045 of file pentiumfrontend.cpp.

References Type::asCompound(), Type::asPointer(), CallStatement::getDestProc(), CompoundType::getNumTypes(), Signature::getParamType(), PointerType::getPointsTo(), Proc::getSignature(), CompoundType::getType(), NULL, Type::resolvesToCompound(), Type::resolvesToFunc(), and Type::resolvesToPointer().

unsigned PentiumFrontEnd::fetch4 unsigned char *  ptr  )  [private]

std::vector< Exp * > & PentiumFrontEnd::getDefaultParams  )  [virtual]

Implements FrontEnd.

Definition at line 197 of file pentiumfrontend.cpp.

References Location::memOf(), and Location::regOf().

std::vector< Exp * > & PentiumFrontEnd::getDefaultReturns  )  [virtual]

Implements FrontEnd.

Definition at line 214 of file pentiumfrontend.cpp.

References opPC, and Location::regOf().

virtual platform PentiumFrontEnd::getFrontEndId  )  [inline, virtual]

Implements FrontEnd.

Definition at line 26 of file pentiumfrontend.h.

References PLAT_PENTIUM.

ADDRESS PentiumFrontEnd::getMainEntryPoint bool &  gotMain  )  [virtual]

Implements FrontEnd.

Definition at line 46 of file testStmtStubs.cpp.

bool PentiumFrontEnd::helperFunc ADDRESS  dest,
ADDRESS  addr,
std::list< RTL * > *  lrtl
[private, virtual]

Reimplemented from FrontEnd.

Definition at line 485 of file pentiumfrontend.cpp.

References RTL::appendStmt(), LOG, NO_ADDRESS, NULL, opFtoi, opMinus, opShiftR, opTruncs, FrontEnd::pBF, FrontEnd::prog, Location::regOf(), Prog::removeProc(), BinaryFile::SymbolByAddress(), and Location::tempOf().

bool PentiumFrontEnd::isAssignFromTern Statement s  )  [private]

Definition at line 121 of file pentiumfrontend.cpp.

References Exp::getOper(), Assign::getRight(), Statement::isAssign(), and opTern.

bool PentiumFrontEnd::isDecAh RTL r  )  [private]

Definition at line 80 of file pentiumfrontend.cpp.

References RTL::elementAt(), RTL::getNumStmt(), Assign::getRight(), Statement::isAssign(), opMinus, opSize, and Location::regOf().

bool PentiumFrontEnd::isSetX Statement e  )  [private]

Definition at line 100 of file pentiumfrontend.cpp.

References Assignment::getLeft(), Exp::getOper(), Assign::getRight(), Exp::getSubExp2(), Exp::getSubExp3(), Statement::isAssign(), Exp::isIntConst(), Exp::isRegOf(), and opTern.

bool PentiumFrontEnd::isStoreFsw Statement s  )  [private]

Definition at line 67 of file pentiumfrontend.cpp.

References FSW, Statement::isAssign(), Location::regOf(), result, and Exp::search().

void PentiumFrontEnd::processFloatCode PBB  pBB,
int &  tos,
Cfg pCfg

Definition at line 341 of file pentiumfrontend.cpp.

References BasicBlock::getRTLs().

void PentiumFrontEnd::processFloatCode Cfg pCfg  )  [private]

Definition at line 239 of file pentiumfrontend.cpp.

References Cfg::getFirstBB(), Cfg::getNextBB(), Statement::isFpush(), Location::regOf(), and Location::tempOf().

Referenced by processProc().

void PentiumFrontEnd::processOverlapped UserProc proc  )  [private]

Definition at line 748 of file pentiumfrontend.cpp.

References Exp::addUsedLocs(), LocationSet::begin(), StatementList::begin(), LocationSet::end(), StatementList::end(), and UserProc::getStatements().

Referenced by processProc().

bool PentiumFrontEnd::processProc ADDRESS  uAddr,
UserProc pProc,
std::ofstream &  os,
bool  frag = false,
bool  spec = false

Reimplemented from FrontEnd.

Definition at line 168 of file pentiumfrontend.cpp.

References UserProc::getCFG(), UserProc::getEntryBB(), processFloatCode(), processOverlapped(), FrontEnd::processProc(), processStringInst(), UserProc::setEntryBB(), and Cfg::unTraverse().

void PentiumFrontEnd::processStringInst UserProc proc  )  [private]

Definition at line 706 of file pentiumfrontend.cpp.

References Cfg::begin(), Cfg::end(), UserProc::getCFG(), BasicBlock::getRTLs(), Exp::getSubExp1(), Exp::isMachFtr(), LOG, NULL, and toBranches().

Referenced by processProc().

bool PentiumFrontEnd::processStsw std::list< RTL * >::iterator &  rit,
std::list< RTL * > *  pRtls,
Cfg pCfg

void PentiumFrontEnd::State25 Exp pLHS,
Exp pRHS,
std::list< RTL * > *  pRtls,
std::list< RTL * >::iterator &  rit,

Member Data Documentation

int PentiumFrontEnd::idPF [private]

Definition at line 60 of file pentiumfrontend.h.

The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:44 2006 for Boomerang by  doxygen 1.4.6