Class PatternBlock
- java.lang.Object
-
- ghidra.app.plugin.processors.sleigh.pattern.PatternBlock
-
public class PatternBlock extends java.lang.Object
A mask/value pair viewed as two bitstreams
-
-
Constructor Summary
Constructors Constructor Description PatternBlock(boolean tf)
PatternBlock(int off, int msk, int val)
PatternBlock(PatternBlock a, PatternBlock b)
PatternBlock(java.util.ArrayList<?> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
alwaysFalse()
boolean
alwaysTrue()
PatternBlock
andBlock(PatternBlock b)
java.lang.Object
clone()
int
getLength()
int
getMask(int startbit, int size)
int[]
getMaskVector()
int
getNonZeroLength()
int
getOffset()
int
getValue(int startbit, int size)
int[]
getValueVector()
byte[]
getWholeBytes()
Extract those portions of the pattern which constitute fully-specified bytesboolean
identical(PatternBlock op2)
boolean
isContextMatch(ParserWalker walker)
boolean
isInstructionMatch(ParserWalker walker)
void
restoreXml(XmlPullParser parser)
void
shift(int sa)
boolean
specializes(PatternBlock op2)
java.lang.String
toString()
-
-
-
Field Detail
-
SHAMT
protected static final int SHAMT
- See Also:
- Constant Field Values
-
LEFT_BYTE
protected static final int LEFT_BYTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PatternBlock
public PatternBlock(int off, int msk, int val)
-
PatternBlock
public PatternBlock(boolean tf)
-
PatternBlock
public PatternBlock(PatternBlock a, PatternBlock b)
-
PatternBlock
public PatternBlock(java.util.ArrayList<?> list)
-
-
Method Detail
-
getMaskVector
public int[] getMaskVector()
-
getValueVector
public int[] getValueVector()
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
-
andBlock
public PatternBlock andBlock(PatternBlock b)
-
specializes
public boolean specializes(PatternBlock op2)
-
identical
public boolean identical(PatternBlock op2)
-
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
public boolean isInstructionMatch(ParserWalker walker)
-
isContextMatch
public boolean isContextMatch(ParserWalker walker)
-
restoreXml
public void restoreXml(XmlPullParser parser)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
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
-
-