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

OddSpacer

public final class OddSpacer extends VariableSizeInsn
Pseudo-instruction which either turns into a nop or nothingness, in order to make the subsequent instruction have an even address. This is used to align (subsequent) instructions that require it.

Fields Summary
Constructors Summary
public OddSpacer(com.android.dx.rop.code.SourcePosition position)
Constructs an instance. The output address of this instance is initially unknown (-1).

param
position non-null; source position

        super(position, RegisterSpecList.EMPTY);
    
Methods Summary
protected java.lang.StringargString()
{@inheritDoc}

        return null;
    
public intcodeSize()
{@inheritDoc}

        return (getAddress() & 1);
    
protected java.lang.StringlistingString0(boolean noteIndices)
{@inheritDoc}

        if (codeSize() == 0) {
            return null;
        }

        return "nop // spacer";
    
public DalvInsnwithRegisters(com.android.dx.rop.code.RegisterSpecList registers)
{@inheritDoc}

        return new OddSpacer(getPosition());
    
public voidwriteTo(com.android.dx.util.AnnotatedOutput out)
{@inheritDoc}

        if (codeSize() != 0) {
            out.writeShort(InsnFormat.codeUnit(DalvOps.NOP, 0));
        }