mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
GP-2212 Mark calls with boolean return values
This commit is contained in:
parent
47cda95669
commit
359ddc5c87
2 changed files with 4 additions and 0 deletions
|
@ -1470,6 +1470,8 @@ void ActionFuncLink::funcLinkOutput(FuncCallSpecs *fc,Funcdata &data)
|
||||||
Datatype *outtype = outparam->getType();
|
Datatype *outtype = outparam->getType();
|
||||||
if (outtype->getMetatype() != TYPE_VOID) {
|
if (outtype->getMetatype() != TYPE_VOID) {
|
||||||
int4 sz = outparam->getSize();
|
int4 sz = outparam->getSize();
|
||||||
|
if (sz == 1 && outtype->getMetatype() == TYPE_BOOL)
|
||||||
|
data.opMarkCalculatedBool(fc->getOp());
|
||||||
Address addr = outparam->getAddress();
|
Address addr = outparam->getAddress();
|
||||||
data.newVarnodeOut(sz,addr,fc->getOp());
|
data.newVarnodeOut(sz,addr,fc->getOp());
|
||||||
VarnodeData vdata;
|
VarnodeData vdata;
|
||||||
|
|
|
@ -4638,6 +4638,8 @@ void FuncCallSpecs::commitNewOutputs(Funcdata &data,Varnode *newout)
|
||||||
// We could conceivably truncate the output to the correct size to match the parameter
|
// We could conceivably truncate the output to the correct size to match the parameter
|
||||||
activeoutput.registerTrial(param->getAddress(),param->getSize());
|
activeoutput.registerTrial(param->getAddress(),param->getSize());
|
||||||
PcodeOp *indop = newout->getDef();
|
PcodeOp *indop = newout->getDef();
|
||||||
|
if (newout->getSize() == 1 && param->getType()->getMetatype() == TYPE_BOOL)
|
||||||
|
data.opMarkCalculatedBool(op);
|
||||||
if (newout->getSize() == param->getSize()) {
|
if (newout->getSize() == param->getSize()) {
|
||||||
if (indop != op) {
|
if (indop != op) {
|
||||||
data.opUnsetOutput(indop);
|
data.opUnsetOutput(indop);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue