mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-10 07:08:21 +08:00
Merge remote-tracking branch 'origin/GP-6538_ConditionalExecutionReturn'
into Ghidra_12.1 (Closes #9018, Closes #9019)
This commit is contained in:
@@ -336,16 +336,15 @@ void ConditionalExecution::doReplacement(PcodeOp *op)
|
||||
if (readop->code() == CPUI_MULTIEQUAL) {
|
||||
rvn = getMultiequalRead(op, readop, slot);
|
||||
}
|
||||
else if (readop->code() == CPUI_RETURN) { // Cannot replace input of RETURN directly, create COPY to hold input
|
||||
Varnode *retvn = readop->getIn(1);
|
||||
else if (readop->code() == CPUI_RETURN && slot > 0) { // Cannot replace input of RETURN directly, create COPY to hold input
|
||||
PcodeOp *newcopyop = fd->newOp(1,readop->getAddr());
|
||||
fd->opSetOpcode(newcopyop,CPUI_COPY);
|
||||
Varnode *outvn = fd->newVarnodeOut(retvn->getSize(),retvn->getAddr(),newcopyop); // Preserve the CPUI_RETURN storage address
|
||||
fd->opSetInput(readop,outvn,1);
|
||||
Varnode *outvn = fd->newVarnodeOut(vn->getSize(),vn->getAddr(),newcopyop); // Preserve the Varnode's storage address
|
||||
fd->opSetInput(readop,outvn,slot);
|
||||
fd->opInsertBefore(newcopyop,readop);
|
||||
readop = newcopyop;
|
||||
slot = 0;
|
||||
rvn = getReplacementRead(op,bl);
|
||||
rvn = getReplacementRead(op,bl); // COPY gets the replacement read
|
||||
}
|
||||
else
|
||||
rvn = getReplacementRead(op,bl);
|
||||
|
||||
Reference in New Issue
Block a user