Class PatternBlock
java.lang.Object
ghidra.app.plugin.processors.sleigh.pattern.PatternBlock
A mask/value pair viewed as two bitstreams
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPatternBlock
(boolean tf) PatternBlock
(int off, int msk, int val) PatternBlock
(ArrayList<?> list) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
clone()
void
int
int
getMask
(int startbit, int size) int[]
int
int
int
getValue
(int startbit, int size) int[]
byte[]
Extract those portions of the pattern which constitute fully-specified bytesboolean
identical
(PatternBlock op2) boolean
isContextMatch
(ParserWalker walker) boolean
isInstructionMatch
(ParserWalker walker) void
shift
(int sa) boolean
specializes
(PatternBlock op2) toString()
-
Field Details
-
SHAMT
protected static final int SHAMT- See Also:
-
LEFT_BYTE
protected static final int LEFT_BYTE- See Also:
-
-
Constructor Details
-
PatternBlock
public PatternBlock(int off, int msk, int val) -
PatternBlock
public PatternBlock(boolean tf) -
PatternBlock
-
PatternBlock
-
-
Method Details
-
getMaskVector
public int[] getMaskVector() -
getValueVector
public int[] getValueVector() -
clone
-
andBlock
-
specializes
-
identical
-
shift
public void shift(int sa) -
getLength
public int getLength() -
getMask
public int getMask(int startbit, int size) -
getValue
public int getValue(int startbit, int size) -
alwaysTrue
public boolean alwaysTrue() -
alwaysFalse
public boolean alwaysFalse() -
isInstructionMatch
-
isContextMatch
-
decode
- Throws:
DecoderException
-
toString
-
getOffset
public int getOffset() -
getNonZeroLength
public int getNonZeroLength() -
getWholeBytes
public byte[] getWholeBytes()Extract those portions of the pattern which constitute fully-specified bytes- Returns:
- an array of bytes
-