mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
0f9a209cab
2 changed files with 5 additions and 1 deletions
|
@ -1832,6 +1832,8 @@ void PrintC::pushSymbol(const Symbol *sym,const Varnode *vn,const PcodeOp *op)
|
||||||
tokenColor = EmitMarkup::global_color;
|
tokenColor = EmitMarkup::global_color;
|
||||||
else if (sym->getCategory() == Symbol::function_parameter)
|
else if (sym->getCategory() == Symbol::function_parameter)
|
||||||
tokenColor = EmitMarkup::param_color;
|
tokenColor = EmitMarkup::param_color;
|
||||||
|
else if (sym->getCategory() == Symbol::equate)
|
||||||
|
tokenColor = EmitMarkup::const_color;
|
||||||
else
|
else
|
||||||
tokenColor = EmitMarkup::var_color;
|
tokenColor = EmitMarkup::var_color;
|
||||||
pushSymbolScope(sym);
|
pushSymbolScope(sym);
|
||||||
|
|
|
@ -7234,11 +7234,13 @@ int4 RuleSubNormal::applyOp(PcodeOp *op,Funcdata &data)
|
||||||
if (!shiftop->getIn(1)->isConstant()) return 0;
|
if (!shiftop->getIn(1)->isConstant()) return 0;
|
||||||
Varnode *a = shiftop->getIn(0);
|
Varnode *a = shiftop->getIn(0);
|
||||||
if (a->isFree()) return 0;
|
if (a->isFree()) return 0;
|
||||||
|
Varnode *outvn = op->getOut();
|
||||||
|
if (outvn->isPrecisHi() || outvn->isPrecisLo()) return 0;
|
||||||
int4 n = shiftop->getIn(1)->getOffset();
|
int4 n = shiftop->getIn(1)->getOffset();
|
||||||
int4 c = op->getIn(1)->getOffset();
|
int4 c = op->getIn(1)->getOffset();
|
||||||
int4 k = (n/8);
|
int4 k = (n/8);
|
||||||
int4 insize = a->getSize();
|
int4 insize = a->getSize();
|
||||||
int4 outsize = op->getOut()->getSize();
|
int4 outsize = outvn->getSize();
|
||||||
|
|
||||||
// Total shift + outsize must be greater equal to size of input
|
// Total shift + outsize must be greater equal to size of input
|
||||||
if ((n+8*c+8*outsize < 8*insize)&&(n != k*8)) return 0;
|
if ((n+8*c+8*outsize < 8*insize)&&(n != k*8)) return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue