Class TokenField
java.lang.Object
ghidra.app.plugin.processors.sleigh.expression.PatternExpression
ghidra.app.plugin.processors.sleigh.expression.PatternValue
ghidra.app.plugin.processors.sleigh.expression.TokenField
A contiguous set of bits within instruction stream, interpreted
as an integer value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longbyteSwap(long val, int size) Swap the least sig -size- bytes in -val-voiddecode(Decoder decoder, SleighLanguage lang) booleanintintintintintgetShift()longgetValue(ParserWalker walker) inthashCode()booleanbooleanlongmaxValue()longminValue()static longsignExtend(long val, int bit) Sign extend -val- above -bit-toString()static longzeroExtend(long val, int bit) Clear all bits in -val- above -bit-Methods inherited from class ghidra.app.plugin.processors.sleigh.expression.PatternExpression
decodeExpression
-
Constructor Details
-
TokenField
public TokenField()
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
minValue
public long minValue()- Specified by:
minValuein classPatternValue
-
maxValue
public long maxValue()- Specified by:
maxValuein classPatternValue
-
getValue
- Specified by:
getValuein classPatternExpression- Throws:
MemoryAccessException
-
getBitStart
public int getBitStart() -
getBitEnd
public int getBitEnd() -
getByteStart
public int getByteStart() -
getByteEnd
public int getByteEnd() -
decode
- Specified by:
decodein classPatternExpression- Throws:
DecoderException
-
hasSignbit
public boolean hasSignbit() -
signExtend
public static long signExtend(long val, int bit) Sign extend -val- above -bit-- Parameters:
val- value to extendbit- bit specifying sign- Returns:
- the extended value
-
zeroExtend
public static long zeroExtend(long val, int bit) Clear all bits in -val- above -bit-- Parameters:
val- value to zero extendbit- bit above which to zero extend- Returns:
- the extended value
-
byteSwap
public static long byteSwap(long val, int size) Swap the least sig -size- bytes in -val-- Parameters:
val- value to be byte swappedsize- number of bytes involved in swap- Returns:
- the byte swapped value
-
isBigEndian
public boolean isBigEndian() -
getShift
public int getShift() -
toString
- Specified by:
toStringin classPatternExpression
-