decompiler 1.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ghidra::InsertExpression Class Reference

A write to a bitfield stored in an explicit Varnode. More...

#include <expression.hh>

Inheritance diagram for ghidra::InsertExpression:
ghidra::BitFieldExpression

Public Member Functions

 InsertExpression (const PcodeOp *insert)
 Construct from an INSERT.
 
- Public Member Functions inherited from ghidra::BitFieldExpression
const VarnoderecoverStructurePointer (const Varnode *vn, int4 offset)
 Recover the Varnode holding the pointer to the parent structure.
 
bool isValid (void) const
 Is this a valid bitfield expression.
 

Static Public Member Functions

static uintb getRangeMask (const PcodeOp *insert)
 Get a mask representing the INSERTed range of bits.
 
static uintb getLSBMask (const PcodeOp *insert)
 Get mask of least significant bits matching INSERT size.
 
- Static Public Member Functions inherited from ghidra::BitFieldExpression
static const TypeBitFieldgetPullField (const PcodeOp *pull)
 Get field description corresponding to given ZPULL or SPULL.
 

Public Attributes

const PcodeOpinsertOp
 INSERT op.
 
const Symbolsymbol
 Structure symbol represented by the INSERT output.
 
- Public Attributes inherited from ghidra::BitFieldExpression
TypeStructtheStruct
 Parent structure containing the bitfield.
 
const TypeBitFieldbitfield
 Formal bitfield description.
 
int4 byteRangeOffset
 Offset of byte range into encompassStruct.
 
int4 offsetToBitStruct
 Offset of structure containing bitfield in encompassStruct.
 

Additional Inherited Members

- Protected Member Functions inherited from ghidra::BitFieldExpression
void getStructures (Datatype *dt, int4 initByteOff, int4 leastBitOff, bool isBigEndian)
 Recover the structure(s) holding the bitfield.
 

Detailed Description

A write to a bitfield stored in an explicit Varnode.

The INSERT output is expected to be a associated with a (partial) symbol and hold data-type information.

Member Function Documentation

◆ getLSBMask()

uintb ghidra::InsertExpression::getLSBMask ( const PcodeOp insert)
static

Get mask of least significant bits matching INSERT size.

Parameters
insertis the CPUI_INSERT op
Returns
mask with of the least significant bits

References ghidra::PcodeOp::getIn(), and ghidra::Varnode::getOffset().

Referenced by ghidra::RuleInsertAbsorb::absorbAnd().

◆ getRangeMask()

uintb ghidra::InsertExpression::getRangeMask ( const PcodeOp insert)
static

Get a mask representing the INSERTed range of bits.

Parameters
insertis the CPUI_INSERT op
Returns
a mask with a 1 wherever bits are inserted by the op

References ghidra::PcodeOp::getIn(), and ghidra::Varnode::getOffset().

Referenced by ghidra::BitFieldTransform::findOverwrite(), ghidra::BitFieldInsertTransform::verifyLoadStoreOriginalValue(), and ghidra::BitFieldInsertTransform::verifyMappedOriginalValue().


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