Addition of INSERT,EXTRACT, and POPCOUNT opcodes to decompiler code

This commit is contained in:
caheckman 2019-09-04 13:15:07 -04:00
parent 2cafb27574
commit 0fdd29b98d
17 changed files with 164 additions and 8 deletions

View file

@ -99,6 +99,9 @@ void OpBehavior::registerInstructions(vector<OpBehavior *> &inst,const Translate
inst[CPUI_SEGMENTOP] = new OpBehavior(CPUI_SEGMENTOP,false,true);
inst[CPUI_CPOOLREF] = new OpBehavior(CPUI_CPOOLREF,false,true);
inst[CPUI_NEW] = new OpBehavior(CPUI_NEW,false,true);
inst[CPUI_INSERT] = new OpBehavior(CPUI_INSERT,false,true);
inst[CPUI_EXTRACT] = new OpBehavior(CPUI_EXTRACT,false,true);
inst[CPUI_POPCOUNT] = new OpBehaviorPopcount();
}
/// \param sizeout is the size of the output in bytes
@ -725,3 +728,9 @@ uintb OpBehaviorSubpiece::evaluateBinary(int4 sizeout,int4 sizein,uintb in1,uint
return res;
}
uintb OpBehaviorPopcount::evaluateUnary(int4 sizeout,int4 sizein,uintb in1) const
{
return (uintb)popcount(in1);
}