mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Addition of INSERT,EXTRACT, and POPCOUNT opcodes to decompiler code
This commit is contained in:
parent
2cafb27574
commit
0fdd29b98d
17 changed files with 164 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue