FileDocCategorySizeDatePackage
FixedSizeInsn.javaAPI DocAndroid 1.5 API2554Wed May 06 22:41:02 BST 2009com.android.dx.dex.code

FixedSizeInsn

public abstract class FixedSizeInsn extends DalvInsn
Base class for instructions which are of a fixed code size and which use {@link InsnFormat} methods to write themselves. This includes most — but not all — instructions.

Fields Summary
Constructors Summary
public FixedSizeInsn(Dop opcode, com.android.dx.rop.code.SourcePosition position, com.android.dx.rop.code.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 {@link RegisterSpecList#EMPTY}.

param
opcode the opcode; one of the constants from {@link Dops}
param
position non-null; source position
param
registers non-null; register list, including a result register if appropriate (that is, registers may be either ins or outs)

        super(opcode, position, registers);
    
Methods Summary
public final intcodeSize()
{@inheritDoc}

        return getOpcode().getFormat().codeSize();
    
protected final java.lang.StringlistingString0(boolean noteIndices)
{@inheritDoc}

        return getOpcode().getFormat().listingString(this, noteIndices);
    
public final DalvInsnwithRegisterOffset(int delta)
{@inheritDoc}

        return withRegisters(getRegisters().withOffset(delta));
    
public final voidwriteTo(com.android.dx.util.AnnotatedOutput out)
{@inheritDoc}

        getOpcode().getFormat().writeTo(out, this);