Package ghidra.pcode.exec
Class FixedSleighPcodeUseropDefinition<T>
java.lang.Object
ghidra.pcode.exec.AbstractSleighPcodeUseropDefinition<T>
ghidra.pcode.exec.FixedSleighPcodeUseropDefinition<T>
- Type Parameters:
T- no type in particular, except to match any executor
- All Implemented Interfaces:
PcodeUseropLibrary.PcodeUseropDefinition<T>,SleighPcodeUseropDefinition<T>
A Sleigh userop definition with one signature
-
Nested Class Summary
Nested classes/interfaces inherited from class ghidra.pcode.exec.AbstractSleighPcodeUseropDefinition
AbstractSleighPcodeUseropDefinition.BuilderNested classes/interfaces inherited from interface ghidra.pcode.exec.SleighPcodeUseropDefinition
SleighPcodeUseropDefinition.BodyFunc, SleighPcodeUseropDefinition.BuilderStage1, SleighPcodeUseropDefinition.BuilderStage2, SleighPcodeUseropDefinition.Factory, SleighPcodeUseropDefinition.SignatureDef -
Field Summary
FieldsFields inherited from class ghidra.pcode.exec.AbstractSleighPcodeUseropDefinition
cacheByArgs, language, nameFields inherited from interface ghidra.pcode.exec.SleighPcodeUseropDefinition
EMPTY_ARGS, OUT_SYMBOL_NAME -
Constructor Summary
ConstructorsChangeModifierConstructorDescriptionprotectedFixedSleighPcodeUseropDefinition(SleighLanguage language, String name, SleighPcodeUseropDefinition.SignatureDef definition) -
Method Summary
ChangeModifier and TypeMethodDescriptionGet the Sleigh source that defines this useropintGet the number of input operands accepted by the userop.Class<?> If this userop is defined as a java callback, get the type of the outputGet the single signature and definitionprogramFor(List<Varnode> args, PcodeUseropLibrary<?> library) Get the p-code program implementing this userop for the given arguments and library.Methods inherited from class ghidra.pcode.exec.AbstractSleighPcodeUseropDefinition
canInlinePcode, execute, getDefiningLibrary, getJavaMethod, getName, hasSideEffects, isFunctional, modifiesContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.pcode.exec.PcodeUseropLibrary.PcodeUseropDefinition
executeMethods inherited from interface ghidra.pcode.exec.SleighPcodeUseropDefinition
getBody
-
Field Details
-
definition
-
-
Constructor Details
-
FixedSleighPcodeUseropDefinition
protected FixedSleighPcodeUseropDefinition(SleighLanguage language, String name, SleighPcodeUseropDefinition.SignatureDef definition)
-
-
Method Details
-
getInputCount
public int getInputCount()Description copied from interface:PcodeUseropLibrary.PcodeUseropDefinitionGet the number of input operands accepted by the userop.- Returns:
- the count or -1 if the userop is variadic
-
getSignatureDef
Get the single signature and definition- Returns:
- the definition
-
getBody
Description copied from interface:SleighPcodeUseropDefinitionGet the Sleigh source that defines this useropThe body may or may not actually depend on the arguments. Ideally, it does not, but sometimes the body may vary depending on the sizes of the arguments. In cases where it is known the body is fixed, the args parameter may be null or an empty list. When the arguments are required, index 0 must be the output varnode. If the userop has no output, index 0 may be null.
- Parameters:
args- the argument varnodes- Returns:
- the body
-
programFor
Description copied from interface:SleighPcodeUseropDefinitionGet the p-code program implementing this userop for the given arguments and library.This will compile and cache a program for each new combination of arguments seen.
- Parameters:
args- the operands, output at index 0, and inputs followinglibrary- the complete userop library- Returns:
- the p-code program to be fed to the same executor as invoked this userop, but in a new frame
-
getOutputType
Description copied from interface:PcodeUseropLibrary.PcodeUseropDefinitionIf this userop is defined as a java callback, get the type of the outputIf the method has a
@AnnotatedPcodeUseropLibrary.OpOutputannotation, this is the type of the output parameter. Otherwise, this is the method's return type.- Returns:
- the output type
-