Class FixedSleighPcodeUseropDefinition
java.lang.Object
ghidra.pcode.exec.AbstractSleighPcodeUseropDefinition
ghidra.pcode.exec.FixedSleighPcodeUseropDefinition
- All Implemented Interfaces:
PcodeUseropLibrary.PcodeUseropDefinition<Object>, SleighPcodeUseropDefinition
A Sleigh userop definition with one signature
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractSleighPcodeUseropDefinition
AbstractSleighPcodeUseropDefinition.BuilderNested classes/interfaces inherited from interface SleighPcodeUseropDefinition
SleighPcodeUseropDefinition.BodyFunc, SleighPcodeUseropDefinition.BuilderStage1, SleighPcodeUseropDefinition.BuilderStage2, SleighPcodeUseropDefinition.Factory, SleighPcodeUseropDefinition.SignatureDef -
Field Summary
FieldsFields inherited from class AbstractSleighPcodeUseropDefinition
cacheByArgs, nameFields inherited from interface SleighPcodeUseropDefinition
EMPTY_ARGS, FACTORY, OUT_SYMBOL_NAME -
Constructor Summary
ConstructorsChangeModifierConstructorDescriptionprotectedFixedSleighPcodeUseropDefinition(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.Get the single signature and definitionprogramFor(SleighLanguage language, List<Varnode> args, PcodeUseropLibrary<?> library) Get the p-code program implementing this userop for the given arguments and library.REMOVEDClass<?>RemovedMethods inherited from class AbstractSleighPcodeUseropDefinition
canInlinePcode, canInterrupt, execute, getDefiningLibrary, getJavaMethod, getName, getOutputType, hasSideEffects, isFunctional, isInSigned, isOutSigned, modifiesContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PcodeUseropLibrary.PcodeUseropDefinition
executeMethods inherited from interface SleighPcodeUseropDefinition
cast, getBody
-
Field Details
-
definition
-
-
Constructor Details
-
FixedSleighPcodeUseropDefinition
protected FixedSleighPcodeUseropDefinition(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
public PcodeProgram programFor(SleighLanguage language, List<Varnode> args, PcodeUseropLibrary<?> library) 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:
language- the language of the executorargs- 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
-