Package ghidra.pcode.emu.jit.op
Interface JitCallOtherOpIf
- All Superinterfaces:
JitOp
- All Known Implementing Classes:
JitCallOtherDefOp
,JitCallOtherOp
A use-def node for a
PcodeOp.CALLOTHER
.
This requires the userop()
to exist. For the case of a missing userop, we use
JitCallOtherMissingOp
.
TODO: We have several considerations remaining, esp., since we'd like to handle system calls via userops efficiently:
- There are more inputs than listed in the op itself. In fact, the invocation is just
syscall()
. The actual inputs are at leastRAX
and whatever parameters that specific syscall wants. - We'd like to be able to evaluate
RAX
statically. - We Might like to inject the p-code rather than trying to compile and run it separately. Then, in the case of a syscall, the actual Java callback should have known inputs and outputs. Would probably not want to embed a huge if-elseif tree for syscall numbers, though, which is why we'd like to evaluate RAX ahead of time. What if we can't, though? My thought is to retire all the variables and just interpret the syscall.
-
Method Summary
Modifier and TypeMethodDescriptionargs()
The arguments to the userop.default boolean
Indicates the operation can be removed if its output is never used.dfState()
Get the captured data flow state at the call site.inputs()
The input operand use-def nodes in some defined orderThe type behavior for each parameter in the userop definitiondefault void
link()
Add this op to theJitVal.uses()
of each input operand, and (if applicable) set theJitOutVar.definition()
of the output operand to this op.default JitTypeBehavior
typeFor
(int position) Get the required type behavior for the input at the given position inJitOp.inputs()
default void
unlink()
Remove this op from theJitVal.uses()
of each input operand, and (if applicable) unset theJitOutVar.definition()
of the output operand.userop()
The userop definition.
-
Method Details
-
userop
The userop definition.- Returns:
- the definition from the library
-
args
The arguments to the userop.- Returns:
- the list of use-def value nodes
-
inputs
Description copied from interface:JitOp
The input operand use-def nodes in some defined order -
inputTypes
List<JitTypeBehavior> inputTypes()The type behavior for each parameter in the userop definitionThese should correspond to each argument (input).
- Returns:
- the list of behaviors
-
typeFor
Description copied from interface:JitOp
Get the required type behavior for the input at the given position inJitOp.inputs()
-
dfState
JitDataFlowState.MiniDFState dfState()Get the captured data flow state at the call site.- Returns:
- the state
-
canBeRemoved
default boolean canBeRemoved()Description copied from interface:JitOp
Indicates the operation can be removed if its output is never used.- Specified by:
canBeRemoved
in interfaceJitOp
- Returns:
- true if removable
-
link
default void link()Description copied from interface:JitOp
Add this op to theJitVal.uses()
of each input operand, and (if applicable) set theJitOutVar.definition()
of the output operand to this op. -
unlink
default void unlink()Description copied from interface:JitOp
Remove this op from theJitVal.uses()
of each input operand, and (if applicable) unset theJitOutVar.definition()
of the output operand.
-