Class AssemblyOperandState
java.lang.Object
ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyState
ghidra.app.plugin.assembler.sleigh.sem.AssemblyOperandState
The state corresponding to a non-sub-table operand
This is roughly analogous to ConstructState, but for assembly. However, it also records
the value of the operand and the actual operand symbol whose value it specifies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final OperandSymbolprotected final AssemblyTerminalprotected final long -
Constructor Summary
ConstructorsConstructorDescriptionAssemblyOperandState(AbstractAssemblyTreeResolver<?> resolver, List<AssemblyConstructorSemantic> path, int shift, AssemblyTerminal terminal, long value, OperandSymbol opSym) Construct the state for a given operand and selected value -
Method Summary
Modifier and TypeMethodDescriptionprotected intCompute the size in bits of this operand's valueintPre compute this nodes hashbooleanlonggetValue()protected booleanprotected Stream<AssemblyResolvedPatterns> resolve(AssemblyResolvedPatterns fromRight, Collection<AssemblyResolvedError> errors) Generate machine (partial) code for this nodeprotected AssemblyResolutionSolve the operand's defining expression set equal to the desired valuetoString()Methods inherited from class ghidra.app.plugin.assembler.sleigh.sem.AbstractAssemblyState
getLength, getPath, getResolver, getShift, hashCode
-
Field Details
-
terminal
-
value
protected final long value -
opSym
-
-
Constructor Details
-
AssemblyOperandState
public AssemblyOperandState(AbstractAssemblyTreeResolver<?> resolver, List<AssemblyConstructorSemantic> path, int shift, AssemblyTerminal terminal, long value, OperandSymbol opSym) Construct the state for a given operand and selected value- Parameters:
resolver- the resolverpath- the path for diagnosticsshift- the (right) shift of this operandterminal- the terminal that generated this statevalue- the value of the operandopSym- the operand symbol
-
-
Method Details
-
computeHash
public int computeHash()Description copied from class:AbstractAssemblyStatePre compute this nodes hash- Specified by:
computeHashin classAbstractAssemblyState- Returns:
- the hash
-
partsEqual
-
equals
- Specified by:
equalsin classAbstractAssemblyState
-
toString
-
computeBitsize
protected int computeBitsize()Compute the size in bits of this operand's valueIf this operand does not have a strict size, 0 is returned.
- Returns:
- the size
-
solveNumeric
Solve the operand's defining expression set equal to the desired value- Returns:
- the resolved patterns, an error, or a backfill
-
resolve
protected Stream<AssemblyResolvedPatterns> resolve(AssemblyResolvedPatterns fromRight, Collection<AssemblyResolvedError> errors) Description copied from class:AbstractAssemblyStateGenerate machine (partial) code for this node- Specified by:
resolvein classAbstractAssemblyState- Parameters:
fromRight- the accumulated patterns thus far, from the right sibling or left-most childerrors- a place to collect error reports- Returns:
- the stream of generated patterns, as accumulated
-
getTerminal
-
getValue
public long getValue() -
getOperandSymbol
-