mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Don't let splitflow undo double-precision merges
This commit is contained in:
parent
169d9859f7
commit
1271bf044a
3 changed files with 6 additions and 0 deletions
|
@ -723,6 +723,8 @@ void SplitVarnode::wholeList(Varnode *w,vector<SplitVarnode> &splitvec)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (res==0) return;
|
if (res==0) return;
|
||||||
|
if (res == 3 && (basic.lo->getSize() + basic.hi->getSize() != basic.wholesize))
|
||||||
|
return;
|
||||||
|
|
||||||
splitvec.push_back(basic);
|
splitvec.push_back(basic);
|
||||||
findCopies(basic,splitvec);
|
findCopies(basic,splitvec);
|
||||||
|
|
|
@ -7610,6 +7610,8 @@ int4 RuleSplitFlow::applyOp(PcodeOp *op,Funcdata &data)
|
||||||
Varnode *vn = op->getIn(0);
|
Varnode *vn = op->getIn(0);
|
||||||
if (!vn->isWritten())
|
if (!vn->isWritten())
|
||||||
return 0;
|
return 0;
|
||||||
|
if (vn->isPrecisLo() || vn->isPrecisHi())
|
||||||
|
return 0;
|
||||||
if (op->getOut()->getSize() + loSize != vn->getSize())
|
if (op->getOut()->getSize() + loSize != vn->getSize())
|
||||||
return 0; // Make sure SUBPIECE is taking most significant part
|
return 0; // Make sure SUBPIECE is taking most significant part
|
||||||
PcodeOp *concatOp = (PcodeOp *)0;
|
PcodeOp *concatOp = (PcodeOp *)0;
|
||||||
|
|
|
@ -1554,6 +1554,8 @@ bool SplitFlow::traceForward(TransformVar *rvn)
|
||||||
break;
|
break;
|
||||||
case CPUI_SUBPIECE:
|
case CPUI_SUBPIECE:
|
||||||
{
|
{
|
||||||
|
if (outvn->isPrecisLo() || outvn->isPrecisHi())
|
||||||
|
return false; // Do not split if we know value comes from double precision pieces
|
||||||
uintb val = op->getIn(1)->getOffset();
|
uintb val = op->getIn(1)->getOffset();
|
||||||
if ((val==0)&&(outvn->getSize() == laneDescription.getSize(0))) {
|
if ((val==0)&&(outvn->getSize() == laneDescription.getSize(0))) {
|
||||||
TransformOp *rop = newPreexistingOp(1,CPUI_COPY,op); // Grabs the low piece
|
TransformOp *rop = newPreexistingOp(1,CPUI_COPY,op); // Grabs the low piece
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue