Package ghidra.program.model.lang
Class OperandType
- java.lang.Object
-
- ghidra.program.model.lang.OperandType
-
public final class OperandType extends java.lang.ObjectHelper class for testing operand related flags in an integer.
-
-
Field Summary
Fields Modifier and Type Field Description static intADDRESSBit set if the operand is used as an address.static intBITBit set if the operand is a bit valuestatic intBYTEBit set if the operand is a byte valuestatic intCODEBit set it the address referred to contains code.static intCOPBit set if the operand is a co-processor valuestatic intDATABit set if the address referred to contains data.static intDYNAMICBit set if the operand is dynamically defined given some processorContext.static intFLAGBit set if the operand is a flag.static intFLOATBit set if the operand is a float valuestatic intIMMEDIATEBit set if operand is an immediate value.static intIMPLICITBit set if operand is implicit.static intINDIRECTBit set if operand is an indirect reference.static intLISTBit set if the operand is a register.static intPORTBit set if the operand is a register.static intQUADWORDBit set if the operand is a 8 byte valuestatic intREADBit set if operand refers to an address being readstatic intREGISTERBit set if the operand is a register.static intRELATIVEBit set if operand depends on the instruction's address.static intSCALARBit set if the operand is a scalar valuestatic intSIGNEDBit set if the operand is a signed valuestatic intTEXTBit set if the operand is text.static intWORDBit set if the operand is a 2 byte valuestatic intWRITEBit set if operand refers to an address being written to
-
Constructor Summary
Constructors Constructor Description OperandType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleandoesRead(int operandType)check the READ flag.static booleandoesWrite(int operandType)check the WRITE flag.static booleanisAddress(int operandType)check ADDRESS flag.static booleanisBit(int operandType)check the BIT flag.static booleanisByte(int operandType)check the BYTE flag.static booleanisCodeReference(int operandType)check the CODE flag.static booleanisCoProcessor(int operandType)check the COPROCESSOR flag.static booleanisDataReference(int operandType)check the DATA flag.static booleanisFlag(int operandType)check the CONDITION FLAG flag.static booleanisFloat(int operandType)check the FLOAT flag.static booleanisImmediate(int operandType)check the IMMEDIATE flag.static booleanisImplicit(int operandType)check the IMPLICIT flag.static booleanisIndirect(int operandType)check the INDIRECT flag.static booleanisList(int operandType)check the LIST flag.static booleanisPort(int operandType)check the PORT flag.static booleanisQuadWord(int operandType)check the QUADWORD flag.static booleanisRegister(int operandType)check the REGISTER flag.static booleanisRelative(int operandType)check the RELATIVE flag.static booleanisScalar(int operandType)check SCALAR flag.static booleanisScalarAsAddress(int operandType)check if both a scalar and an addressstatic booleanisSigned(int operandType)check the SIGNED flag.static booleanisText(int operandType)check the TEXT flag.static booleanisWord(int operandType)check the WORD flag.static java.lang.StringtoString(int operandType)returns a string representation of the given operandType
-
-
-
Field Detail
-
READ
public static final int READ
Bit set if operand refers to an address being read- See Also:
- Constant Field Values
-
WRITE
public static final int WRITE
Bit set if operand refers to an address being written to- See Also:
- Constant Field Values
-
INDIRECT
public static final int INDIRECT
Bit set if operand is an indirect reference.- See Also:
- Constant Field Values
-
IMMEDIATE
public static final int IMMEDIATE
Bit set if operand is an immediate value.- See Also:
- Constant Field Values
-
RELATIVE
public static final int RELATIVE
Bit set if operand depends on the instruction's address.- See Also:
- Constant Field Values
-
IMPLICIT
public static final int IMPLICIT
Bit set if operand is implicit.- See Also:
- Constant Field Values
-
CODE
public static final int CODE
Bit set it the address referred to contains code.- See Also:
- Constant Field Values
-
DATA
public static final int DATA
Bit set if the address referred to contains data.- See Also:
- Constant Field Values
-
PORT
public static final int PORT
Bit set if the operand is a register.- See Also:
- Constant Field Values
-
REGISTER
public static final int REGISTER
Bit set if the operand is a register.- See Also:
- Constant Field Values
-
LIST
public static final int LIST
Bit set if the operand is a register.- See Also:
- Constant Field Values
-
FLAG
public static final int FLAG
Bit set if the operand is a flag.- See Also:
- Constant Field Values
-
TEXT
public static final int TEXT
Bit set if the operand is text.- See Also:
- Constant Field Values
-
ADDRESS
public static final int ADDRESS
Bit set if the operand is used as an address. If this is not set, assume it is a scalar value.- See Also:
- Constant Field Values
-
SCALAR
public static final int SCALAR
Bit set if the operand is a scalar value- See Also:
- Constant Field Values
-
BIT
public static final int BIT
Bit set if the operand is a bit value- See Also:
- Constant Field Values
-
BYTE
public static final int BYTE
Bit set if the operand is a byte value- See Also:
- Constant Field Values
-
WORD
public static final int WORD
Bit set if the operand is a 2 byte value- See Also:
- Constant Field Values
-
QUADWORD
public static final int QUADWORD
Bit set if the operand is a 8 byte value- See Also:
- Constant Field Values
-
SIGNED
public static final int SIGNED
Bit set if the operand is a signed value- See Also:
- Constant Field Values
-
FLOAT
public static final int FLOAT
Bit set if the operand is a float value- See Also:
- Constant Field Values
-
COP
public static final int COP
Bit set if the operand is a co-processor value- See Also:
- Constant Field Values
-
DYNAMIC
public static final int DYNAMIC
Bit set if the operand is dynamically defined given some processorContext. If bit is set then the SCALAR or ADDRESS bit must be set.- See Also:
- Constant Field Values
-
-
Method Detail
-
doesRead
public static boolean doesRead(int operandType)
check the READ flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the READ flag is set.
-
doesWrite
public static boolean doesWrite(int operandType)
check the WRITE flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the WRITE flag is set.
-
isIndirect
public static boolean isIndirect(int operandType)
check the INDIRECT flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the INDIRECT flag is set.
-
isImmediate
public static boolean isImmediate(int operandType)
check the IMMEDIATE flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the IMMEDIATE flag is set.
-
isRelative
public static boolean isRelative(int operandType)
check the RELATIVE flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the RELATIVE flag is set.
-
isImplicit
public static boolean isImplicit(int operandType)
check the IMPLICIT flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the IMPLICIT flag is set.
-
isCodeReference
public static boolean isCodeReference(int operandType)
check the CODE flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the CODE flag is set.
-
isDataReference
public static boolean isDataReference(int operandType)
check the DATA flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the DATA flag is set.
-
isPort
public static boolean isPort(int operandType)
check the PORT flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the PORT flag is set.
-
isRegister
public static boolean isRegister(int operandType)
check the REGISTER flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the REGISTER flag is set.
-
isList
public static boolean isList(int operandType)
check the LIST flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the LIST flag is set.
-
isFlag
public static boolean isFlag(int operandType)
check the CONDITION FLAG flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the CONDITION flag is set.
-
isText
public static boolean isText(int operandType)
check the TEXT flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the TEXT flag is set.
-
isAddress
public static boolean isAddress(int operandType)
check ADDRESS flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the ADDRESS flag is set
-
isScalar
public static boolean isScalar(int operandType)
check SCALAR flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the SCALAR flag is set
-
isBit
public static boolean isBit(int operandType)
check the BIT flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the BIT flag is set.
-
isByte
public static boolean isByte(int operandType)
check the BYTE flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the BYTE flag is set.
-
isWord
public static boolean isWord(int operandType)
check the WORD flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the WORD flag is set.
-
isQuadWord
public static boolean isQuadWord(int operandType)
check the QUADWORD flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the QUADWORD flag is set.
-
isSigned
public static boolean isSigned(int operandType)
check the SIGNED flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the SIGNED flag is set.
-
isFloat
public static boolean isFloat(int operandType)
check the FLOAT flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the FLOAT flag is set.
-
isCoProcessor
public static boolean isCoProcessor(int operandType)
check the COPROCESSOR flag.- Parameters:
operandType- the bit field to examine.- Returns:
- true if the COPROCESSOR flag is set.
-
isScalarAsAddress
public static boolean isScalarAsAddress(int operandType)
check if both a scalar and an address- Parameters:
operandType- the bit field to examine.- Returns:
- true if it is both a scalar and an address
-
toString
public static java.lang.String toString(int operandType)
returns a string representation of the given operandType- Parameters:
operandType- the operandType bits- Returns:
- the string rep
-
-