My Project
Public Member Functions | Static Protected Member Functions | List of all members
VolatileOp Class Reference

A base class for operations that access volatile memory. More...

#include <userop.hh>

Inheritance diagram for VolatileOp:
Inheritance graph
[legend]
Collaboration diagram for VolatileOp:
Collaboration graph
[legend]

Public Member Functions

 VolatileOp (Architecture *g, const string &nm, int4 ind)
 Constructor.
 
- Public Member Functions inherited from UserPcodeOp
 UserPcodeOp (Architecture *g, const string &nm, int4 ind)
 Construct from name and index.
 
const string & getName (void) const
 Get the low-level name of the p-code op.
 
int4 getIndex (void) const
 Get the constant id of the op.
 
virtual ~UserPcodeOp (void)
 Destructor.
 
virtual string getOperatorName (const PcodeOp *op) const
 Get the symbol representing this operation in decompiled code. More...
 
virtual void restoreXml (const Element *el)=0
 Restore the detailed description from an XML stream. More...
 

Static Protected Member Functions

static string appendSize (const string &base, int4 size)
 Append a suffix to a string encoding a specific size. More...
 

Additional Inherited Members

- Protected Attributes inherited from UserPcodeOp
string name
 Low-level name of p-code operator.
 
int4 useropindex
 Index passed in the CALLOTHER op.
 
Architectureglb
 Architecture owning the user defined op.
 

Detailed Description

A base class for operations that access volatile memory.

The decompiler models volatile memory by converting any direct read or write of the memory to a function that accesses the memory. This class and its derived classes model such functions. Within the p-code control-flow, dedicated user defined ops serve as a placeholder for the (possibly unknown) effects of modifying/accessing the memory and prevent accidental constant propagation.

Member Function Documentation

◆ appendSize()

string VolatileOp::appendSize ( const string &  base,
int4  size 
)
staticprotected

Append a suffix to a string encoding a specific size.

This allows a single user defined operator to have multiple symbol names based on the size of its operands in context.

Parameters
baseis the string to append the suffix to
sizeis the size to encode expressed as the number of bytes
Returns
the appended string

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