mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
got rid of FULL typeCode
This commit is contained in:
parent
f51cb8b4a1
commit
0c5bd081c5
2 changed files with 5 additions and 6 deletions
|
@ -1423,7 +1423,6 @@ void CircleRange::printRaw(ostream &s) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const int4 ValueSet::FULL = 100;
|
|
||||||
const int4 ValueSet::MAX_STEP = 32;
|
const int4 ValueSet::MAX_STEP = 32;
|
||||||
|
|
||||||
/// The initial values in \b this are set based on the type of Varnode:
|
/// The initial values in \b this are set based on the type of Varnode:
|
||||||
|
@ -1462,7 +1461,7 @@ void ValueSet::setVarnode(Varnode *v,int4 tCode)
|
||||||
else { // Some other form of input
|
else { // Some other form of input
|
||||||
opCode = CPUI_MAX;
|
opCode = CPUI_MAX;
|
||||||
numParams = 0;
|
numParams = 0;
|
||||||
typeCode = FULL;
|
typeCode = 0;
|
||||||
range.setFull(vn->getSize());
|
range.setFull(vn->getSize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1581,7 +1580,7 @@ bool ValueSet::iterate(void)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (!vn->isWritten()) return false;
|
if (!vn->isWritten()) return false;
|
||||||
if (typeCode >= FULL) return false;
|
if (range.isFull()) return false;
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
computeTypeCode();
|
computeTypeCode();
|
||||||
count += 1; // Count this iteration
|
count += 1; // Count this iteration
|
||||||
|
@ -1721,7 +1720,7 @@ void ValueSetRead::setPcodeOp(PcodeOp *o,int4 slt)
|
||||||
typeCode = 0;
|
typeCode = 0;
|
||||||
op = o;
|
op = o;
|
||||||
slot = slt;
|
slot = slt;
|
||||||
equationTypeCode = ValueSet::FULL;
|
equationTypeCode = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \param slt is the given slot
|
/// \param slt is the given slot
|
||||||
|
@ -1757,6 +1756,7 @@ void ValueSetRead::printRaw(ostream &s) const
|
||||||
|
|
||||||
{
|
{
|
||||||
s << "Read: " << get_opname(op->code());
|
s << "Read: " << get_opname(op->code());
|
||||||
|
s << '(' << op->getSeqNum() << ')';
|
||||||
if (typeCode == 0)
|
if (typeCode == 0)
|
||||||
s << " absolute ";
|
s << " absolute ";
|
||||||
else
|
else
|
||||||
|
|
|
@ -109,7 +109,6 @@ class Partition; // Forward declaration
|
||||||
/// or some other register (if \b typeCode is non-zero).
|
/// or some other register (if \b typeCode is non-zero).
|
||||||
class ValueSet {
|
class ValueSet {
|
||||||
public:
|
public:
|
||||||
static const int4 FULL; ///< Special typeCode indicating is permanently marked full
|
|
||||||
static const int4 MAX_STEP; ///< Maximum step inferred for a value set
|
static const int4 MAX_STEP; ///< Maximum step inferred for a value set
|
||||||
/// \brief An external that can be applied to a ValueSet
|
/// \brief An external that can be applied to a ValueSet
|
||||||
///
|
///
|
||||||
|
@ -136,7 +135,7 @@ private:
|
||||||
Partition *partHead; ///< If Varnode is a component head, pointer to corresponding Partition
|
Partition *partHead; ///< If Varnode is a component head, pointer to corresponding Partition
|
||||||
ValueSet *next; ///< Next ValueSet to iterate
|
ValueSet *next; ///< Next ValueSet to iterate
|
||||||
bool doesEquationApply(int4 num,int4 slot) const; ///< Does the indicated equation apply for the given input slot
|
bool doesEquationApply(int4 num,int4 slot) const; ///< Does the indicated equation apply for the given input slot
|
||||||
void setFull(void) { range.setFull(vn->getSize()); typeCode = FULL; } ///< Mark value set as possibly containing any value
|
void setFull(void) { range.setFull(vn->getSize()); typeCode = 0; } ///< Mark value set as possibly containing any value
|
||||||
void setVarnode(Varnode *v,int4 tCode); ///< Attach \b this to given Varnode and set initial values
|
void setVarnode(Varnode *v,int4 tCode); ///< Attach \b this to given Varnode and set initial values
|
||||||
void addEquation(int4 slot,int4 type,const CircleRange &constraint); ///< Insert an equation restricting \b this value set
|
void addEquation(int4 slot,int4 type,const CircleRange &constraint); ///< Insert an equation restricting \b this value set
|
||||||
void addLandmark(int4 type,const CircleRange &constraint) { addEquation(numParams,type,constraint); } ///< Add a widening landmark
|
void addLandmark(int4 type,const CircleRange &constraint) { addEquation(numParams,type,constraint); } ///< Add a widening landmark
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue