Class AbstractImmediateOperandBuilder<T extends IInstructionOperand>
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractOperandBuilder<T>
com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractImmediateOperandBuilder<T>
- All Implemented Interfaces:
IOperandBuilder<T>
- Direct Known Subclasses:
ImmediateOperandBuilder
public abstract class AbstractImmediateOperandBuilder<T extends IInstructionOperand>
extends AbstractOperandBuilder<T>
An operand builder for immediates with default values which can be zero-extended or
sign-extended. Only int and long implementations are supported for now.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Extension mode and size for integer immediates. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
Allow an additional 1 added to retrieved valuestatic final int
Fields inherited from class com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractOperandBuilder
flags, NO_FLAG, OPTIONAL, OPTIONAL_DEFAULT_VALUE, OPTIONAL_MASK
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractImmediateOperandBuilder
(AbstractImmediateOperandBuilder.ImmediateType type, int flags, int defaultValue, int defaultValueMask, IEncodedMemoryArea memoryArea) protected
AbstractImmediateOperandBuilder
(AbstractImmediateOperandBuilder.ImmediateType type, int flags, int defaultValue, IEncodedMemoryArea memoryArea) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
buildImmediate
(int mode, long value) buildOperand
(byte[] code, int mode) int
protected int
getSize()
protected long
getValue
(byte[] code, int mode) boolean
isSigned()
void
postAdd
(int postAdd) Methods inherited from class com.pnfsoftware.jeb.core.units.code.asm.processor.AbstractOperandBuilder
decodeMemoryArea, getFlags, getMemoryArea, isOptional
-
Field Details
-
POST_ADD1
public static final int POST_ADD1Allow an additional 1 added to retrieved value- See Also:
-
REL_ADDRESS
public static final int REL_ADDRESS- See Also:
-
ABS_ADDRESS
public static final int ABS_ADDRESS- See Also:
-
PC_SHIFT_4
public static final int PC_SHIFT_4- See Also:
-
-
Constructor Details
-
AbstractImmediateOperandBuilder
protected AbstractImmediateOperandBuilder(AbstractImmediateOperandBuilder.ImmediateType type, int flags, int defaultValue, IEncodedMemoryArea memoryArea) -
AbstractImmediateOperandBuilder
protected AbstractImmediateOperandBuilder(AbstractImmediateOperandBuilder.ImmediateType type, int flags, int defaultValue, int defaultValueMask, IEncodedMemoryArea memoryArea)
-
-
Method Details
-
postAdd
public void postAdd(int postAdd) -
getValue
- Parameters:
code
-mode
-- Returns:
- Throws:
ProcessorException
- Illegal value
-
buildOperand
- Throws:
ProcessorException
-
getSize
protected int getSize() -
getPostAdd
public int getPostAdd() -
isSigned
public boolean isSigned() -
buildImmediate
-