Package ghidra.pcode.emu.jit.op
Record Class JitSynthSubPieceOp
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.op.JitSynthSubPieceOp
- Record Components:
out
- the use-def variable node for the outputoffset
- the offset, in bytes, to shift rightv
- the input use-def value node
- All Implemented Interfaces:
JitDefOp
,JitOp
,JitSyntheticOp
public record JitSynthSubPieceOp(JitOutVar out, int offset, JitVal v)
extends Record
implements JitDefOp, JitSyntheticOp
The synthetic use-def node for subpiece.
These are synthesized when memory/register access patterns cause only part of a use-def variable
node to be "read." E.g., consider AX
to be written and then AL
read. These are
different than JitSubPieceOp
in that the latter have an actual PcodeOp
associated.
-
Constructor Summary
ConstructorsConstructorDescriptionJitSynthSubPieceOp
(JitOutVar out, int offset, JitVal v) Compact constructor for validation. -
Method Summary
Modifier and TypeMethodDescriptionboolean
abuts
(JitSynthSubPieceOp right) Check if this piece abuts the given piece.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.inputs()
The input operand use-def nodes in some defined ordervoid
link()
Add this op to theJitVal.uses()
of each input operand, and (if applicable) set theJitOutVar.definition()
of the output operand to this op.int
offset()
Returns the value of theoffset
record component.out()
Returns the value of theout
record component.final String
toString()
Returns a string representation of this record class.type()
The required type behavior for the outputtypeFor
(int position) Get the required type behavior for the input at the given position inJitOp.inputs()
void
unlink()
Remove this op from theJitVal.uses()
of each input operand, and (if applicable) unset theJitOutVar.definition()
of the output operand.v()
Returns the value of thev
record component.vType()
We'd like the input to be anint
.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ghidra.pcode.emu.jit.op.JitDefOp
canBeRemoved
Methods inherited from interface ghidra.pcode.emu.jit.op.JitSyntheticOp
op
-
Constructor Details
-
JitSynthSubPieceOp
Compact constructor for validation.- Parameters:
out
- the use-def variable node for the outputoffset
- the offset, in bytes, to shift rightv
- the input use-def value node
-
-
Method Details
-
link
public 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
public 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. -
inputs
Description copied from interface:JitOp
The input operand use-def nodes in some defined order -
vType
We'd like the input to be anint
.- Returns:
JitTypeBehavior.INTEGER
-
type
Description copied from interface:JitDefOp
The required type behavior for the output -
typeFor
Description copied from interface:JitOp
Get the required type behavior for the input at the given position inJitOp.inputs()
-
abuts
Check if this piece abuts the given piece.To "abut," the pieces must take the same value as input, and then this piece's offset must be exactly the other's offset plus its size. Consider this diagram:
[this][right]
We want this piece to be in the more-significant position immediately before the given piece. We thus compute
diff
the difference in offsets and check if that is equal to the size of the right piece. If it is, then we have:[offset=x+diff,size=s][offset=x,size=diff]
And the "whole piece" is
[offset=x,size=s+diff]
- Parameters:
right
- the piece to the right, i.e., less significant- Returns:
- true if the two pieces can be expressed as one whole
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
out
Returns the value of theout
record component. -
offset
public int offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-
v
Returns the value of thev
record component.- Returns:
- the value of the
v
record component
-