fronthppa.cpp File Reference

#include "global.h"
#include "ss.h"
#include "rtl.h"
#include "cfg.h"
#include "proc.h"
#include "prog.h"
#include "options.h"
#include "csr.h"
#include "frontend.h"
#include "decoder.h"
#include "BinaryFile.h"

Go to the source code of this file.

Defines

#define BRANCH_DS_ERROR   0

Functions

void appendAssignment (SemStr *lhs, SemStr *rhs, int size, ADDRESS addr, HRTLList *lrtl)
bool case_CALL_NCT (ADDRESS &address, DecodeResult &inst, DecodeResult &delay_inst, list< HRTL * > *&BB_rtls, UserProc *proc, std::list< CallStatement * > &callList, ofstream &os, bool isPattern=false)
bool case_DD_NCT (ADDRESS &address, int delta, DecodeResult &inst, DecodeResult &delay_inst, list< HRTL * > *&BB_rtls, Cfg *cfg, TARGETS &targets, UserProc *proc, std::list< CallStatement * > &callList, int size)
bool case_SCD_NCT (ADDRESS &address, int delta, ADDRESS hiAddress, DecodeResult &inst, DecodeResult &delay_inst, list< HRTL * > *&BB_rtls, Cfg *cfg, TARGETS &targets)
bool case_SCDAN_NCT (ADDRESS &address, int delta, ADDRESS hiAddress, DecodeResult &inst, DecodeResult &delay_inst, list< HRTL * > *&BB_rtls, Cfg *cfg, TARGETS &targets)
void case_SD_NCT (ADDRESS &address, int delta, ADDRESS hiAddress, DecodeResult &inst, DecodeResult &delay_inst, list< HRTL * > *&BB_rtls, Cfg *cfg, TARGETS &targets, ofstream &os)
void case_unhandled_stub (ADDRESS addr)
void emitCopyPC (HRTLList *pRtls, ADDRESS uAddr)
void emitNop (HRTLList *pRtls, ADDRESS uAddr)
void handleBranch (ADDRESS dest, ADDRESS hiAddress, BasicBlock *&newBB, Cfg *cfg, TARGETS &targets)
void handleCall (ADDRESS dest, BasicBlock *callBB, Cfg *cfg, ADDRESS address, int offset=0)
bool helperFunc (ADDRESS dest, ADDRESS addr, HRTLList *lrtl)
void initCti ()
void initFront ()
bool interferes (HRTL *delayRtl, HRTL *mainRtl)
bool optimise_DelayCopy (ADDRESS src, ADDRESS dest, int delta, ADDRESS uUpper)
void setReturnLocations (CalleeEpilogue *epilogue, int iReg)
void warnDCTcouple (ADDRESS uAt, ADDRESS uDest)

Variables

int idCWP = -1
int idNPC = -1
int idTmp = -1
static DecodeResult nop_inst


Define Documentation

#define BRANCH_DS_ERROR   0
 


Function Documentation

void appendAssignment SemStr *  lhs,
SemStr *  rhs,
int  size,
ADDRESS  addr,
HRTLList *  lrtl
 

Definition at line 1414 of file fronthppa.cpp.

bool case_CALL_NCT ADDRESS address,
DecodeResult inst,
DecodeResult delay_inst,
list< HRTL * > *&  BB_rtls,
UserProc proc,
std::list< CallStatement * > &  callList,
ofstream &  os,
bool  isPattern = false
 

Definition at line 277 of file fronthppa.cpp.

References UserProc::getCFG(), NOP, Cfg::print(), DecodeResult::rtl, and DecodeResult::type.

bool case_DD_NCT ADDRESS address,
int  delta,
DecodeResult inst,
DecodeResult delay_inst,
list< HRTL * > *&  BB_rtls,
Cfg cfg,
TARGETS &  targets,
UserProc proc,
std::list< CallStatement * > &  callList,
int  size
 

Definition at line 494 of file fronthppa.cpp.

References COMPCALL, COMPJUMP, Cfg::newBB(), NOP, RET, DecodeResult::rtl, DecodeResult::type, and RTL::updateAddress().

bool case_SCD_NCT ADDRESS address,
int  delta,
ADDRESS  hiAddress,
DecodeResult inst,
DecodeResult delay_inst,
list< HRTL * > *&  BB_rtls,
Cfg cfg,
TARGETS &  targets
 

Definition at line 624 of file fronthppa.cpp.

References Cfg::addOutEdge(), handleBranch(), interferes(), Cfg::newBB(), NOP, NULL, ONEWAY, optimise_DelayCopy(), DecodeResult::rtl, TWOWAY, DecodeResult::type, and RTL::updateAddress().

bool case_SCDAN_NCT ADDRESS address,
int  delta,
ADDRESS  hiAddress,
DecodeResult inst,
DecodeResult delay_inst,
list< HRTL * > *&  BB_rtls,
Cfg cfg,
TARGETS &  targets
 

Definition at line 757 of file fronthppa.cpp.

References Cfg::addOutEdge(), handleBranch(), Cfg::newBB(), NULL, ONEWAY, optimise_DelayCopy(), DecodeResult::rtl, BasicBlock::setJumpReqd(), TWOWAY, and RTL::updateAddress().

void case_SD_NCT ADDRESS address,
int  delta,
ADDRESS  hiAddress,
DecodeResult inst,
DecodeResult delay_inst,
list< HRTL * > *&  BB_rtls,
Cfg cfg,
TARGETS &  targets,
ofstream &  os
 

Definition at line 426 of file fronthppa.cpp.

References handleBranch(), Cfg::newBB(), NOP, NULL, ONEWAY, optimise_DelayCopy(), DecodeResult::rtl, DecodeResult::type, and RTL::updateAddress().

void case_unhandled_stub ADDRESS  addr  ) 
 

Definition at line 249 of file fronthppa.cpp.

void emitCopyPC HRTLList *  pRtls,
ADDRESS  uAddr
 

Definition at line 1384 of file fronthppa.cpp.

void emitNop HRTLList *  pRtls,
ADDRESS  uAddr
 

Definition at line 1362 of file fronthppa.cpp.

void handleBranch ADDRESS  dest,
ADDRESS  hiAddress,
BasicBlock *&  newBB,
Cfg cfg,
TARGETS &  targets
 

Definition at line 184 of file fronthppa.cpp.

References NULL.

Referenced by case_SCD_NCT(), case_SCDAN_NCT(), and case_SD_NCT().

void handleCall ADDRESS  dest,
BasicBlock callBB,
Cfg cfg,
ADDRESS  address,
int  offset = 0
 

Definition at line 217 of file fronthppa.cpp.

References NULL.

bool helperFunc ADDRESS  dest,
ADDRESS  addr,
HRTLList *  lrtl
 

Definition at line 1429 of file fronthppa.cpp.

void initCti  ) 
 

void initFront  ) 
 

Definition at line 78 of file fronthppa.cpp.

References idNPC, idTmp, NOP, nop_inst, DecodeResult::numBytes, DecodeResult::rtl, DecodeResult::type, and DecodeResult::valid.

bool interferes HRTL *  delayRtl,
HRTL *  mainRtl
 

Definition at line 118 of file fronthppa.cpp.

References m, NULL, and result.

Referenced by case_SCD_NCT().

bool optimise_DelayCopy ADDRESS  src,
ADDRESS  dest,
int  delta,
ADDRESS  uUpper
 

Definition at line 157 of file fronthppa.cpp.

Referenced by case_SCD_NCT(), case_SCDAN_NCT(), and case_SD_NCT().

void setReturnLocations CalleeEpilogue *  epilogue,
int  iReg
 

Definition at line 1614 of file fronthppa.cpp.

void warnDCTcouple ADDRESS  uAt,
ADDRESS  uDest
 

Definition at line 101 of file fronthppa.cpp.


Variable Documentation

int idCWP = -1
 

Definition at line 54 of file fronthppa.cpp.

int idNPC = -1
 

Definition at line 53 of file fronthppa.cpp.

Referenced by initFront().

int idTmp = -1
 

Definition at line 55 of file fronthppa.cpp.

Referenced by initFront().

DecodeResult nop_inst [static]
 

Definition at line 59 of file fronthppa.cpp.

Referenced by initFront().


Generated on Tue Sep 19 21:18:37 2006 for Boomerang by  doxygen 1.4.6