Class ConstructorPcodeTemplate
java.lang.Object
ghidra.app.plugin.processors.generic.ConstructorPcodeTemplate
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UnimplementedConstructor
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPcodeOpTemplate
(Object opT) int
int
Method getPcode.void
optimize()
The default pcode generated for a constructor is typically not very efficient.result()
void
-
Constructor Details
-
ConstructorPcodeTemplate
public ConstructorPcodeTemplate()
-
-
Method Details
-
addPcodeOpTemplate
- Throws:
SledException
-
trimToSize
public void trimToSize() -
optimize
public void optimize()The default pcode generated for a constructor is typically not very efficient. For example, for an add instruction, we might generate something like tmp1 = LOAD register_space register1 tmp2 = LOAD register_space register2 tmp3 = ADD tmp1 tmp2 STORE register_space register3 tmp3 This routine marks opcodes and varnodes as potentially omitable, which allows us to generate much simpler pcode whenever there are no dynamic references involved. In the case above we would replace the 4 pcode ops above with a single pcode op: register3 = ADD register1 register2 -
getFlowFlags
public int getFlowFlags() -
getPcode
public Handle getPcode(ArrayList<PcodeOp> pcode, Position position, int off, ArrayList<PcodeOp> delayPcode) throws Exception Method getPcode. Recursive pcode generation method.- Parameters:
pcode
- - current list of pcode instructions to which we will append new instructionsposition
-off
-delayPcode
- - pcode for instruction(s) in delay slot- Returns:
- HandleTemplate - handle for the result of this constructors pcode
- Throws:
Exception
-
delaySlotDepth
public int delaySlotDepth() -
result
-