ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DisassemblerPowerpc Class Reference

Disassembler for the PowerPC architecture. More...

#include <DisassemblerPowerpc.h>

Inheritance diagram for DisassemblerPowerpc:
Collaboration diagram for DisassemblerPowerpc:

Classes

class  ExceptionPowerpc
 Same as Disassembler::Exception except with a different constructor for ease of use in DisassemblerPowerpc. More...
 

Public Member Functions

 DisassemblerPowerpc ()
 
 DisassemblerPowerpc (const DisassemblerPowerpc &other)
 
virtual ~DisassemblerPowerpc ()
 
virtual DisassemblerPowerpcclone () const
 Creates a new copy of a disassembler. More...
 
virtual bool can_disassemble (SgAsmGenericHeader *) const
 Predicate determining the suitability of a disassembler for a specific file header. More...
 
virtual SgAsmInstructiondisassembleOne (const MemoryMap *map, rose_addr_t start_va, AddressSet *successors=NULL)
 This is the lowest level disassembly function and is implemented in the architecture-specific subclasses. More...
 
virtual void assembleOne (SgAsmInstruction *, SgUnsignedCharList &)
 
virtual SgAsmInstructionmake_unknown_instruction (const Exception &)
 Makes an unknown instruction from an exception. More...
 
- Public Member Functions inherited from Disassembler
 Disassembler ()
 
 Disassembler (const Disassembler &other)
 
virtual ~Disassembler ()
 
void disassemble (SgAsmInterpretation *, AddressSet *successors=NULL, BadMap *bad=NULL)
 This high-level method disassembles instructions belonging to part of a file described by an executable file header as indicated by the specified interpretation. More...
 
void set_registers (const RegisterDictionary *rdict)
 Specifies the registers available on this architecture. More...
 
const RegisterDictionaryget_registers () const
 Returns the dictionary used for looking up register names. More...
 
void set_partitioner (class Partitioner *p)
 Specifies the instruction partitioner to use when partitioning instructions into functions. More...
 
class Partitionerget_partitioner () const
 Returns the partitioner object set by set_partitioner(). More...
 
void set_search (unsigned bits)
 Specifies the heuristics used when searching for instructions. More...
 
unsigned get_search () const
 Returns a bit mask of SearchHeuristic bits representing which heuristics would be used when searching for instructions. More...
 
void set_wordsize (size_t)
 Specifies the word size for the SEARCH_WORDS heuristic. More...
 
size_t get_wordsize () const
 Returns the word size used by the SEARCH_WORDS heuristic. More...
 
void set_alignment (size_t)
 Specifies the alignment for the SEARCH_WORDS heuristic. More...
 
size_t get_alignment () const
 Returns the alignment used by the SEARCH_WORDS heuristic. More...
 
void set_sex (ByteOrder::Endianness sex)
 Specifies the byte order for the SEARCH_WORDS heuristic. More...
 
ByteOrder::Endianness get_sex () const
 Returns the byte order used by the SEARCH_WORDS heuristic. More...
 
void set_debug (FILE *f)
 Sends disassembler diagnostics to the specified output stream. More...
 
FILE * get_debug () const
 Returns the file currently used for debugging; null implies no debugging. More...
 
size_t get_ndisassembled () const
 Returns the number of instructions successfully disassembled. More...
 
void set_protection (unsigned bitvec)
 Normally the disassembler will only read memory when the execute permission is turned on for the memory. More...
 
unsigned get_protection () const
 Returns a bit vector describing which bits must be enabled in the MemoryMap in order for the disassembler to read from that memory. More...
 
void set_progress_reporting (FILE *, unsigned min_interval)
 Set progress reporting properties. More...
 
SgAsmInstructiondisassembleOne (const unsigned char *buf, rose_addr_t buf_va, size_t buf_size, rose_addr_t start_va, AddressSet *successors=NULL)
 Similar in functionality to the disassembleOne method that takes a MemoryMap argument, except the content buffer is mapped 1:1 to virtual memory beginning at the specified address. More...
 
InstructionMap disassembleBlock (const MemoryMap *map, rose_addr_t start_va, AddressSet *successors=NULL, InstructionMap *cache=NULL)
 Like the disassembleOne method except it disassembles a basic block's worth of instructions beginning at the specified virtual address. More...
 
InstructionMap disassembleBlock (const unsigned char *buf, rose_addr_t buf_va, size_t buf_size, rose_addr_t start_va, AddressSet *successors=NULL, InstructionMap *cache=NULL)
 Similar in functionality to the disassembleBlock method that takes a MemoryMap argument, except the supplied buffer is mapped 1:1 to virtual memory beginning at the specified address. More...
 
InstructionMap disassembleBuffer (const MemoryMap *map, size_t start_va, AddressSet *successors=NULL, BadMap *bad=NULL)
 Disassembles instructions from the content buffer beginning at the specified virtual address and including all instructions that are direct or indirect successors of the first instruction. More...
 
InstructionMap disassembleBuffer (const unsigned char *buf, rose_addr_t buf_va, size_t buf_size, rose_addr_t start_va, AddressSet *successors=NULL, BadMap *bad=NULL)
 Similar in functionality to the disassembleBuffer methods that take a MemoryMap argument, except the supplied buffer is mapped 1:1 to virtual memory beginning at the specified address. More...
 
InstructionMap disassembleBuffer (const MemoryMap *map, AddressSet workset, AddressSet *successors=NULL, BadMap *bad=NULL)
 Similar in functionality to the disassembleBuffer methods that take a single starting virtual address, except this one tries to disassemble from all the addresses specified in the workset. More...
 
InstructionMap disassembleSection (SgAsmGenericSection *section, rose_addr_t section_va, rose_addr_t start_offset, AddressSet *successors=NULL, BadMap *bad=NULL)
 Disassembles instructions in the specified section by assuming that it's mapped to a particular starting address. More...
 
InstructionMap disassembleInterp (SgAsmInterpretation *interp, AddressSet *successors=NULL, BadMap *bad=NULL)
 Disassembles instructions in a particular binary interpretation. More...
 
void search_following (AddressSet *worklist, const InstructionMap &bb, rose_addr_t bb_va, const MemoryMap *map, const InstructionMap &tried)
 Adds the address following a basic block to the list of addresses that should be disassembled. More...
 
void search_immediate (AddressSet *worklist, const InstructionMap &bb, const MemoryMap *map, const InstructionMap &tried)
 Adds values of immediate operands to the list of addresses that should be disassembled. More...
 
void search_words (AddressSet *worklist, const MemoryMap *map, const InstructionMap &tried)
 Adds all word-aligned values to work list, provided they specify a virtual address in the map. More...
 
void search_next_address (AddressSet *worklist, rose_addr_t start_va, const MemoryMap *map, const InstructionMap &insns, const InstructionMap &tried, bool avoid_overlaps)
 Finds the lowest virtual address, greater than or equal to start_va, which does not correspond to a previous disassembly attempt as evidenced by its presence in the supplied instructions or bad map. More...
 
void search_function_symbols (AddressSet *worklist, const MemoryMap *, SgAsmGenericHeader *)
 Adds addresses that correspond to function symbols. More...
 
void update_progress (SgAsmInstruction *)
 Updates progress information. More...
 
void progress (FILE *, const char *fmt,...) const __attribute__((format(printf
 Conditionally prints a progress report. More...
 
void mark_referenced_instructions (SgAsmInterpretation *, const MemoryMap *, const InstructionMap &)
 Marks parts of the file that correspond to instructions as having been referenced. More...
 
AddressSet get_block_successors (const InstructionMap &, bool *complete)
 Calculates the successor addresses of a basic block and adds them to a successors set. More...
 

Private Member Functions

SgAsmPowerpcRegisterReferenceExpressionmakeRegister (PowerpcRegisterClass reg_class, int reg_number, PowerpcConditionRegisterAccessGranularity reg_grainularity=powerpc_condreggranularity_whole) const
 
template<size_t First, size_t Last>
uint32_t fld () const
 Helper function to use field definitions (counted with bits from left and inclusive on both sides) from manual. More...
 
bool AA () const
 
SgAsmPowerpcRegisterReferenceExpressionBA () const
 
SgAsmPowerpcRegisterReferenceExpressionBB () const
 
uint64_t BD () const
 
SgAsmPowerpcRegisterReferenceExpressionBF_cr () const
 
SgAsmPowerpcRegisterReferenceExpressionBF_fpscr () const
 
SgAsmPowerpcRegisterReferenceExpressionBFA_cr () const
 
SgAsmPowerpcRegisterReferenceExpressionBFA_fpscr () const
 
SgAsmValueExpressionBH () const
 
SgAsmPowerpcRegisterReferenceExpressionBI () const
 
SgAsmValueExpressionBO () const
 
SgAsmPowerpcRegisterReferenceExpressionBT () const
 
SgAsmValueExpressionD () const
 
SgAsmValueExpressionDS () const
 
SgAsmValueExpressionFLM () const
 
SgAsmPowerpcRegisterReferenceExpressionFRA () const
 
SgAsmPowerpcRegisterReferenceExpressionFRB () const
 
SgAsmPowerpcRegisterReferenceExpressionFRC () const
 
SgAsmPowerpcRegisterReferenceExpressionFRS () const
 
SgAsmPowerpcRegisterReferenceExpressionFRT () const
 
SgAsmValueExpressionFXM () const
 
SgAsmValueExpressionL_10 () const
 
SgAsmValueExpressionL_15 () const
 
uint8_t L_sync () const
 
SgAsmValueExpressionLEV () const
 
uint64_t LI () const
 
bool LK () const
 
SgAsmValueExpressionMB_32bit () const
 
SgAsmValueExpressionME_32bit () const
 
SgAsmValueExpressionMB_64bit () const
 
SgAsmValueExpressionME_64bit () const
 
SgAsmValueExpressionNB () const
 
bool OE () const
 
SgAsmPowerpcRegisterReferenceExpressionRA () const
 
SgAsmExpressionRA_or_zero () const
 
SgAsmPowerpcRegisterReferenceExpressionRB () const
 
bool Rc () const
 
SgAsmPowerpcRegisterReferenceExpressionRS () const
 
SgAsmPowerpcRegisterReferenceExpressionRT () const
 
SgAsmValueExpressionSH_32bit () const
 
SgAsmValueExpressionSH_64bit () const
 
SgAsmValueExpressionSI () const
 
SgAsmPowerpcRegisterReferenceExpressionSPR () const
 
SgAsmPowerpcRegisterReferenceExpressionSR () const
 
SgAsmPowerpcRegisterReferenceExpressionTBR () const
 
SgAsmValueExpressionTH () const
 
SgAsmValueExpressionTO () const
 
SgAsmValueExpressionU () const
 
SgAsmValueExpressionUI () const
 
SgAsmMemoryReferenceExpressionmemref (SgAsmType *t) const
 
SgAsmMemoryReferenceExpressionmemrefx (SgAsmType *t) const
 
SgAsmMemoryReferenceExpressionmemrefu (SgAsmType *t) const
 
SgAsmMemoryReferenceExpressionmemrefux (SgAsmType *t) const
 
SgAsmPowerpcInstructiondecode_I_formInstruction ()
 
SgAsmPowerpcInstructiondecode_B_formInstruction ()
 
SgAsmPowerpcInstructiondecode_SC_formInstruction ()
 
SgAsmPowerpcInstructiondecode_DS_formInstruction ()
 
SgAsmPowerpcInstructiondecode_X_formInstruction_00 ()
 
SgAsmPowerpcInstructiondecode_X_formInstruction_1F ()
 
SgAsmPowerpcInstructiondecode_X_formInstruction_3F ()
 
SgAsmPowerpcInstructiondecode_XL_formInstruction ()
 
SgAsmPowerpcInstructiondecode_XS_formInstruction ()
 
SgAsmPowerpcInstructiondecode_A_formInstruction_00 ()
 
SgAsmPowerpcInstructiondecode_A_formInstruction_04 ()
 
SgAsmPowerpcInstructiondecode_A_formInstruction_3B ()
 
SgAsmPowerpcInstructiondecode_A_formInstruction_3F ()
 
SgAsmPowerpcInstructiondecode_MD_formInstruction ()
 
SgAsmPowerpcInstructiondecode_MDS_formInstruction ()
 
SgAsmIntegerValueExpressionmakeBranchTarget (uint64_t targetAddr) const
 
SgAsmPowerpcInstructiondisassemble ()
 
void init ()
 Initialize instances of this class. More...
 
void startInstruction (rose_addr_t start_va, uint32_t c)
 Resets disassembler state to beginning of an instruction. More...
 

Static Private Member Functions

static SgAsmPowerpcInstructionmakeInstructionWithoutOperands (uint64_t address, const std::string &mnemonic, PowerpcInstructionKind kind, uint32_t insn)
 

Private Attributes

uint64_t ip
 Instruction pointer. More...
 
uint32_t insn
 4-byte instruction word More...
 

Additional Inherited Members

- Public Types inherited from Disassembler
enum  SearchHeuristic {
  SEARCH_FOLLOWING = 0x0001,
  SEARCH_IMMEDIATE = 0x0002,
  SEARCH_WORDS = 0x0004,
  SEARCH_ALLBYTES = 0x0008,
  SEARCH_UNUSED = 0x0010,
  SEARCH_NONEXE = 0x0020,
  SEARCH_DEADEND = 0x0040,
  SEARCH_UNKNOWN = 0x0080,
  SEARCH_FUNCSYMS = 0x0100,
  SEARCH_DEFAULT = 0x0101
}
 Heuristics used to find instructions to disassemble. More...
 
typedef std::set< rose_addr_tAddressSet
 An AddressSet contains virtual addresses (alternatively, relative virtual addresses) for such things as specifying which virtual addresses should be disassembled. More...
 
typedef Map< rose_addr_t,
SgAsmInstruction * > 
InstructionMap
 The InstructionMap is a mapping from (absolute) virtual address to disassembled instruction. More...
 
typedef Map< rose_addr_t,
Exception
BadMap
 The BadMap is a mapping from (absolute) virtual address to information about a failed disassembly attempt at that address. More...
 
- Static Public Member Functions inherited from Disassembler
static unsigned parse_switches (const std::string &s, unsigned initial=SEARCH_DEFAULT)
 Given a string (presumably from the ROSE command-line), parse it and return the bit vector describing which search heuristics should be employed by the disassembler. More...
 
static void register_subclass (Disassembler *)
 Register a disassembler instance. More...
 
static Disassemblerlookup (SgAsmGenericHeader *)
 Finds a suitable disassembler. More...
 
static Disassemblerlookup (SgAsmInterpretation *)
 Finds a suitable disassembler. More...
 
static void disassembleInterpretation (SgAsmInterpretation *)
 This class method is for backward compatibility with the disassembleInterpretation() function in the old Disassembler namespace. More...
 
- Protected Attributes inherited from Disassembler
const RegisterDictionaryp_registers
 Description of registers available for this platform. More...
 
class Partitionerp_partitioner
 Used for placing instructions into blocks and functions. More...
 
unsigned p_search
 Mask of SearchHeuristic bits specifying instruction searching. More...
 
FILE * p_debug
 Set to non-null to get debugging info. More...
 
size_t p_wordsize
 Word size used by SEARCH_WORDS. More...
 
ByteOrder::Endianness p_sex
 Byte order for SEARCH_WORDS. More...
 
size_t p_alignment
 Word alignment constraint for SEARCH_WORDS (0 and 1 imply byte). More...
 
size_t p_ndisassembled
 Total number of instructions disassembled by disassembleBlock() More...
 
unsigned p_protection
 Memory protection bits that must be set to disassemble. More...
 
- Static Protected Attributes inherited from Disassembler
static std::vector
< Disassembler * > 
disassemblers
 List of disassembler subclasses. More...
 
static time_t progress_interval = 10
 Minimum interval between progress reports. More...
 
static time_t progress_time = 0
 Time of last report, or zero if no report has been generated. More...
 
static FILE * progress_file = stderr
 File to which reports are made. More...
 
static RTS_mutex_t class_mutex = RTS_MUTEX_INITIALIZER(RTS_LAYER_DISASSEMBLER_CLASS)
 Mutex for class-wide thread safety. More...
 

Detailed Description

Disassembler for the PowerPC architecture.

Definition at line 10 of file DisassemblerPowerpc.h.

Constructor & Destructor Documentation

DisassemblerPowerpc::DisassemblerPowerpc ( )
inline

Definition at line 12 of file DisassemblerPowerpc.h.

References init().

Referenced by clone().

DisassemblerPowerpc::DisassemblerPowerpc ( const DisassemblerPowerpc other)
inline

Definition at line 13 of file DisassemblerPowerpc.h.

virtual DisassemblerPowerpc::~DisassemblerPowerpc ( )
inlinevirtual

Definition at line 14 of file DisassemblerPowerpc.h.

Member Function Documentation

virtual DisassemblerPowerpc* DisassemblerPowerpc::clone ( ) const
inlinevirtual

Creates a new copy of a disassembler.

The new copy has all the same settings as the original.

Thread safety: The thread safety of this virtual method depends on the implementation in the subclass.

Implements Disassembler.

Definition at line 15 of file DisassemblerPowerpc.h.

References DisassemblerPowerpc().

virtual bool DisassemblerPowerpc::can_disassemble ( SgAsmGenericHeader ) const
virtual

Predicate determining the suitability of a disassembler for a specific file header.

If this disassembler is capable of disassembling machine code described by the specified file header, then this predicate returns true, otherwise it returns false.

Thread safety: The thread safety of this virtual method depends on the implementation in the subclass.

Implements Disassembler.

virtual SgAsmInstruction* DisassemblerPowerpc::disassembleOne ( const MemoryMap map,
rose_addr_t  start_va,
AddressSet successors = NULL 
)
virtual

This is the lowest level disassembly function and is implemented in the architecture-specific subclasses.

It disassembles one instruction at the specified virtual address. The map is a mapping from virtual addresses to buffer and enables instructions to span file segments that are mapped contiguously in virtual memory by the loader but which might not be contiguous in the file. The instruction's successor virtual addresses are added to the optional successor set (note that successors of an individual instruction can also be obtained via SgAsmInstruction::get_successors). If the instruction cannot be disassembled then an exception is thrown and the successors set is not modified.

Thread safety: The safety of this method depends on its implementation in the subclass. In any case, no other thread can be modifying the MemoryMap or successors set at the same time.

Implements Disassembler.

virtual void DisassemblerPowerpc::assembleOne ( SgAsmInstruction ,
SgUnsignedCharList  
)
inlinevirtual

Definition at line 18 of file DisassemblerPowerpc.h.

virtual SgAsmInstruction* DisassemblerPowerpc::make_unknown_instruction ( const Exception )
virtual

Makes an unknown instruction from an exception.

Thread safety: The safety of this method depends on its implementation in the subclass.

Implements Disassembler.

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::makeRegister ( PowerpcRegisterClass  reg_class,
int  reg_number,
PowerpcConditionRegisterAccessGranularity  reg_grainularity = powerpc_condreggranularity_whole 
) const
private
static SgAsmPowerpcInstruction* DisassemblerPowerpc::makeInstructionWithoutOperands ( uint64_t  address,
const std::string &  mnemonic,
PowerpcInstructionKind  kind,
uint32_t  insn 
)
staticprivate
template<size_t First, size_t Last>
uint32_t DisassemblerPowerpc::fld ( ) const
private

Helper function to use field definitions (counted with bits from left and inclusive on both sides) from manual.

bool DisassemblerPowerpc::AA ( ) const
inlineprivate

Definition at line 50 of file DisassemblerPowerpc.h.

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BA ( ) const
inlineprivate

Definition at line 53 of file DisassemblerPowerpc.h.

References makeRegister().

Referenced by BI().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BB ( ) const
inlineprivate

Definition at line 56 of file DisassemblerPowerpc.h.

References makeRegister().

uint64_t DisassemblerPowerpc::BD ( ) const
inlineprivate

Definition at line 59 of file DisassemblerPowerpc.h.

References insn.

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BF_cr ( ) const
inlineprivate

Definition at line 62 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BF_fpscr ( ) const
inlineprivate

Definition at line 65 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BFA_cr ( ) const
inlineprivate

Definition at line 68 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BFA_fpscr ( ) const
inlineprivate

Definition at line 71 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmValueExpression* DisassemblerPowerpc::BH ( ) const
inlineprivate

Definition at line 74 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BI ( ) const
inlineprivate

Definition at line 77 of file DisassemblerPowerpc.h.

References BA().

SgAsmValueExpression* DisassemblerPowerpc::BO ( ) const
inlineprivate

Definition at line 80 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::BT ( ) const
inlineprivate

Definition at line 83 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmValueExpression* DisassemblerPowerpc::D ( ) const
inlineprivate

Definition at line 86 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeQWordValue().

Referenced by memref(), memrefu(), and SI().

SgAsmValueExpression* DisassemblerPowerpc::DS ( ) const
inlineprivate

Definition at line 89 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeQWordValue().

SgAsmValueExpression* DisassemblerPowerpc::FLM ( ) const
inlineprivate

Definition at line 92 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::FRA ( ) const
inlineprivate

Definition at line 95 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::FRB ( ) const
inlineprivate

Definition at line 98 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::FRC ( ) const
inlineprivate

Definition at line 101 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::FRS ( ) const
inlineprivate

Definition at line 104 of file DisassemblerPowerpc.h.

References makeRegister().

Referenced by FRT().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::FRT ( ) const
inlineprivate

Definition at line 107 of file DisassemblerPowerpc.h.

References FRS().

SgAsmValueExpression* DisassemblerPowerpc::FXM ( ) const
inlineprivate

Definition at line 110 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::L_10 ( ) const
inlineprivate

Definition at line 114 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::L_15 ( ) const
inlineprivate

Definition at line 117 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

uint8_t DisassemblerPowerpc::L_sync ( ) const
inlineprivate

Definition at line 120 of file DisassemblerPowerpc.h.

SgAsmValueExpression* DisassemblerPowerpc::LEV ( ) const
inlineprivate

Definition at line 123 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

uint64_t DisassemblerPowerpc::LI ( ) const
inlineprivate

Definition at line 126 of file DisassemblerPowerpc.h.

bool DisassemblerPowerpc::LK ( ) const
inlineprivate

Definition at line 129 of file DisassemblerPowerpc.h.

SgAsmValueExpression* DisassemblerPowerpc::MB_32bit ( ) const
inlineprivate

Definition at line 132 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::ME_32bit ( ) const
inlineprivate

Definition at line 135 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::MB_64bit ( ) const
inlineprivate

Definition at line 138 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::ME_64bit ( ) const
inlineprivate

Definition at line 141 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::NB ( ) const
inlineprivate

Definition at line 144 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

bool DisassemblerPowerpc::OE ( ) const
inlineprivate

Definition at line 147 of file DisassemblerPowerpc.h.

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::RA ( ) const
inlineprivate

Definition at line 150 of file DisassemblerPowerpc.h.

References makeRegister().

Referenced by memrefu(), memrefux(), and RA_or_zero().

SgAsmExpression* DisassemblerPowerpc::RA_or_zero ( ) const
inlineprivate

Definition at line 153 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue(), and RA().

Referenced by memref(), and memrefx().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::RB ( ) const
inlineprivate

Definition at line 156 of file DisassemblerPowerpc.h.

References makeRegister().

Referenced by memrefux(), and memrefx().

bool DisassemblerPowerpc::Rc ( ) const
inlineprivate

Definition at line 159 of file DisassemblerPowerpc.h.

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::RS ( ) const
inlineprivate

Definition at line 162 of file DisassemblerPowerpc.h.

References makeRegister().

Referenced by RT().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::RT ( ) const
inlineprivate

Definition at line 165 of file DisassemblerPowerpc.h.

References RS().

SgAsmValueExpression* DisassemblerPowerpc::SH_32bit ( ) const
inlineprivate

Definition at line 168 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::SH_64bit ( ) const
inlineprivate

Definition at line 171 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::SI ( ) const
inlineprivate

Definition at line 174 of file DisassemblerPowerpc.h.

References D().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::SPR ( ) const
inlineprivate

Definition at line 177 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::SR ( ) const
inlineprivate

Definition at line 180 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmPowerpcRegisterReferenceExpression* DisassemblerPowerpc::TBR ( ) const
inlineprivate

Definition at line 183 of file DisassemblerPowerpc.h.

References makeRegister().

SgAsmValueExpression* DisassemblerPowerpc::TH ( ) const
inlineprivate

Definition at line 186 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::TO ( ) const
inlineprivate

Definition at line 189 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::U ( ) const
inlineprivate

Definition at line 192 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeByteValue().

SgAsmValueExpression* DisassemblerPowerpc::UI ( ) const
inlineprivate

Definition at line 195 of file DisassemblerPowerpc.h.

References SageBuilderAsm::makeQWordValue().

SgAsmMemoryReferenceExpression* DisassemblerPowerpc::memref ( SgAsmType t) const
inlineprivate
SgAsmMemoryReferenceExpression* DisassemblerPowerpc::memrefx ( SgAsmType t) const
inlineprivate
SgAsmMemoryReferenceExpression* DisassemblerPowerpc::memrefu ( SgAsmType t) const
inlineprivate
SgAsmMemoryReferenceExpression* DisassemblerPowerpc::memrefux ( SgAsmType t) const
inlineprivate
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_I_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_B_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_SC_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_DS_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_X_formInstruction_00 ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_X_formInstruction_1F ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_X_formInstruction_3F ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_XL_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_XS_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_A_formInstruction_00 ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_A_formInstruction_04 ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_A_formInstruction_3B ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_A_formInstruction_3F ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_MD_formInstruction ( )
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::decode_MDS_formInstruction ( )
private
SgAsmIntegerValueExpression* DisassemblerPowerpc::makeBranchTarget ( uint64_t  targetAddr) const
private
SgAsmPowerpcInstruction* DisassemblerPowerpc::disassemble ( )
private
void DisassemblerPowerpc::init ( )
private

Initialize instances of this class.

Called by constructor.

Referenced by DisassemblerPowerpc().

void DisassemblerPowerpc::startInstruction ( rose_addr_t  start_va,
uint32_t  c 
)
inlineprivate

Resets disassembler state to beginning of an instruction.

Definition at line 241 of file DisassemblerPowerpc.h.

References insn, and ip.

Member Data Documentation

uint64_t DisassemblerPowerpc::ip
private

Instruction pointer.

Definition at line 247 of file DisassemblerPowerpc.h.

Referenced by startInstruction().

uint32_t DisassemblerPowerpc::insn
private

4-byte instruction word

Definition at line 248 of file DisassemblerPowerpc.h.

Referenced by BD(), DisassemblerPowerpc::ExceptionPowerpc::ExceptionPowerpc(), and startInstruction().


The documentation for this class was generated from the following file: