mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
GP-4672 Set correct INDIRECT flags during SplitFlow
This commit is contained in:
parent
e6112ce481
commit
a67e80c286
3 changed files with 16 additions and 0 deletions
|
@ -1515,6 +1515,8 @@ bool SplitFlow::addOp(PcodeOp *op,TransformVar *rvn,int4 slot)
|
||||||
if (op->code() == CPUI_INDIRECT) {
|
if (op->code() == CPUI_INDIRECT) {
|
||||||
opSetInput(loOp,newIop(op->getIn(1)),1);
|
opSetInput(loOp,newIop(op->getIn(1)),1);
|
||||||
opSetInput(hiOp,newIop(op->getIn(1)),1);
|
opSetInput(hiOp,newIop(op->getIn(1)),1);
|
||||||
|
loOp->inheritIndirect(op);
|
||||||
|
hiOp->inheritIndirect(op);
|
||||||
numParam = 1;
|
numParam = 1;
|
||||||
}
|
}
|
||||||
for(int4 i=0;i<numParam;++i) {
|
for(int4 i=0;i<numParam;++i) {
|
||||||
|
|
|
@ -268,6 +268,19 @@ bool TransformOp::attemptInsertion(Funcdata *fd)
|
||||||
return true; // Already inserted
|
return true; // Already inserted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Prepare to build the transformed INDIRECT PcodeOp based on settings from the given INDIRECT.
|
||||||
|
/// \param indOp is the given INDIRECT
|
||||||
|
void TransformOp::inheritIndirect(PcodeOp *indOp)
|
||||||
|
|
||||||
|
{
|
||||||
|
if (indOp->isIndirectCreation()) {
|
||||||
|
if (indOp->getIn(0)->isIndirectZero())
|
||||||
|
special |= TransformOp::indirect_creation;
|
||||||
|
else
|
||||||
|
special |= TransformOp::indirect_creation_possible_out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LanedRegister::LanedIterator::normalize(void)
|
void LanedRegister::LanedIterator::normalize(void)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,6 +87,7 @@ private:
|
||||||
public:
|
public:
|
||||||
TransformVar *getOut(void) const { return output; } ///< Get the output placeholder variable for \b this operator
|
TransformVar *getOut(void) const { return output; } ///< Get the output placeholder variable for \b this operator
|
||||||
TransformVar *getIn(int4 i) const { return input[i]; } ///< Get the i-th input placeholder variable for \b this
|
TransformVar *getIn(int4 i) const { return input[i]; } ///< Get the i-th input placeholder variable for \b this
|
||||||
|
void inheritIndirect(PcodeOp *indOp); ///< Set \e indirect \e creation flags for \b this based on given INDIRECT
|
||||||
};
|
};
|
||||||
|
|
||||||
/// \brief Describes a (register) storage location and the ways it might be split into lanes
|
/// \brief Describes a (register) storage location and the ways it might be split into lanes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue