Top Description Constructors Methods
org.droidparts.dexmaker.dx.dex.code

public abstract Class FixedSizeInsn

extends DalvInsn
Class Inheritance
Known Direct Subclasses
org.droidparts.dexmaker.dx.dex.code.SimpleInsn, org.droidparts.dexmaker.dx.dex.code.TargetInsn, org.droidparts.dexmaker.dx.dex.code.CstInsn
Imports
org.droidparts.dexmaker.dx.rop.code.RegisterSpecList, .SourcePosition, org.droidparts.dexmaker.dx.util.AnnotatedOutput

Base class for instructions which are of a fixed code size and which use InsnFormat methods to write themselves. This includes most — but not all — instructions.

Constructor Summary

AccessConstructor and Description
public
FixedSizeInsn(Dop
the opcode; one of the constants from Dops
opcode
,
SourcePosition
non-null; source position
position
,
RegisterSpecList
non-null; register list, including a result register if appropriate (that is, registers may be either ins or outs)
registers
)

Constructs an instance.

Method Summary

Modifier and TypeMethod and Description
public final int
codeSize()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.codeSize.

Gets the size of this instruction, in 16-bit code units.
protected final String
listingString0(boolean
whether to include an explicit notation of constant pool indices
noteIndices
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Helper for listingString, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting.
public final DalvInsn
withRegisterOffset(int
the amount to offset register references by
delta
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisterOffset.

Returns an instance that is just like this one, except that all register references have been offset by the given delta, and its address is reset.
public final void
writeTo(AnnotatedOutput
non-null; where to write to
out
)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.writeTo.

Writes this instance to the given output.
Inherited from org.droidparts.dexmaker.dx.dex.code.DalvInsn:
argStringexpandedPrefixexpandedSuffixexpandedVersiongetAddressgetLowRegVersiongetMinimumRegisterRequirementgetNextAddressgetOpcodegetPositiongetRegistershasAddresshasResultidentifierStringlistingStringmakeMovesetAddresstoStringwithOpcodewithRegisters

Constructor Detail

FixedSizeInsnback to summary
public FixedSizeInsn(Dop opcode, SourcePosition position, RegisterSpecList registers)

Constructs an instance. The output address of this instance is initially unknown (-1).

Note

In the unlikely event that an instruction takes absolutely no registers (e.g., a nop or a no-argument no-result * static method call), then the given register list may be passed as RegisterSpecList#EMPTY.

Parameters
opcode:Dop

the opcode; one of the constants from Dops

position:SourcePosition

non-null; source position

registers:RegisterSpecList

non-null; register list, including a result register if appropriate (that is, registers may be either ins or outs)

Method Detail

codeSizeback to summary
public final int codeSize()

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.codeSize.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.codeSize.

Gets the size of this instruction, in 16-bit code units.

Returns:int

>= 0; the code size of this instruction

Annotations
@Override
listingString0back to summary
protected final String listingString0(boolean noteIndices)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.listingString0.

Helper for listingString, which returns the string form of this instance suitable for inclusion in a human-oriented listing dump, not including the instruction address and without respect for any output formatting. This method should return null if this instance should not appear in a listing.

Parameters
noteIndices:boolean

whether to include an explicit notation of constant pool indices

Returns:String

null-ok; the listing string

Annotations
@Override
withRegisterOffsetback to summary
public final DalvInsn withRegisterOffset(int delta)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisterOffset.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.withRegisterOffset.

Returns an instance that is just like this one, except that all register references have been offset by the given delta, and its address is reset.

Parameters
delta:int

the amount to offset register references by

Returns:DalvInsn

non-null; an appropriately-constructed instance

Annotations
@Override
writeToback to summary
public final void writeTo(AnnotatedOutput out)

Implements abstract org.droidparts.dexmaker.dx.dex.code.DalvInsn.writeTo.

Doc from org.droidparts.dexmaker.dx.dex.code.DalvInsn.writeTo.

Writes this instance to the given output. This method should never annotate the output.

Parameters
out:AnnotatedOutput

non-null; where to write to

Annotations
@Override