FileDocCategorySizeDatePackage
Form3rc.javaAPI DocAndroid 5.1 API3129Thu Mar 12 22:18:30 GMT 2015com.android.dx.dex.code.form

Form3rc

public final class Form3rc extends com.android.dx.dex.code.InsnFormat
Instruction format {@code 3rc}. See the instruction format spec for details.

Fields Summary
public static final com.android.dx.dex.code.InsnFormat
THE_ONE
{@code non-null;} unique instance of this class
Constructors Summary
private Form3rc()
Constructs an instance. This class is not publicly instantiable. Use {@link #THE_ONE}.


                     
      
        // This space intentionally left blank.
    
Methods Summary
public intcodeSize()
{@inheritDoc}

        return 3;
    
public java.lang.StringinsnArgString(com.android.dx.dex.code.DalvInsn insn)
{@inheritDoc}

        return regRangeString(insn.getRegisters()) + ", " +
            cstString(insn);
    
public java.lang.StringinsnCommentString(com.android.dx.dex.code.DalvInsn insn, boolean noteIndices)
{@inheritDoc}

        if (noteIndices) {
            return cstComment(insn);
        } else {
            return "";
        }
    
public booleanisCompatible(com.android.dx.dex.code.DalvInsn insn)
{@inheritDoc}

        if (!(insn instanceof CstInsn)) {
            return false;
        }

        CstInsn ci = (CstInsn) insn;
        int cpi = ci.getIndex();
        Constant cst = ci.getConstant();

        if (! unsignedFitsInShort(cpi)) {
            return false;
        }

        if (!((cst instanceof CstMethodRef) ||
              (cst instanceof CstType))) {
            return false;
        }

        RegisterSpecList regs = ci.getRegisters();
        int sz = regs.size();

        return (regs.size() == 0) ||
            (isRegListSequential(regs) &&
             unsignedFitsInShort(regs.get(0).getReg()) &&
             unsignedFitsInByte(regs.getWordCount()));
    
public voidwriteTo(com.android.dx.util.AnnotatedOutput out, com.android.dx.dex.code.DalvInsn insn)
{@inheritDoc}

        RegisterSpecList regs = insn.getRegisters();
        int cpi = ((CstInsn) insn).getIndex();
        int firstReg = (regs.size() == 0) ? 0 : regs.get(0).getReg();
        int count = regs.getWordCount();

        write(out, opcodeUnit(insn, count), (short) cpi, (short) firstReg);