当前位置: 首页>>代码示例>>Java>>正文


Java DalvInsn.getRegisters方法代码示例

本文整理汇总了Java中com.android.dx.dex.code.DalvInsn.getRegisters方法的典型用法代码示例。如果您正苦于以下问题:Java DalvInsn.getRegisters方法的具体用法?Java DalvInsn.getRegisters怎么用?Java DalvInsn.getRegisters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.dx.dex.code.DalvInsn的用法示例。


在下文中一共展示了DalvInsn.getRegisters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeTo

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    CstLiteralBits cb = (CstLiteralBits) ((CstInsn) insn).getConstant();
    short bits;

    // Where the high bits are depends on the category of the target.
    if (regs.get(0).getCategory() == 1) {
        bits = (short) (cb.getIntBits() >>> 16);
    } else {
        bits = (short) (cb.getLongBits() >>> 48);
    }

    write(out, opcodeUnit(insn, regs.get(0).getReg()), bits);
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:17,代码来源:Form21h.java

示例2: isCompatible

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();

    if (!((insn instanceof CstInsn) &&
          (regs.size() == 1) &&
          unsignedFitsInNibble(regs.get(0).getReg()))) {
        return false;
    }

    CstInsn ci = (CstInsn) insn;
    Constant cst = ci.getConstant();

    if (!(cst instanceof CstLiteralBits)) {
        return false;
    }

    CstLiteralBits cb = (CstLiteralBits) cst;

    return cb.fitsInInt() && signedFitsInNibble(cb.getIntBits());
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:23,代码来源:Form11n.java

示例3: compatibleRegs

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    int sz = regs.size();
    BitSet bits = new BitSet(sz);

    for (int i = 0; i < sz; i++) {
        RegisterSpec reg = regs.get(i);
        /*
         * The check below adds (category - 1) to the register, to
         * account for the fact that the second half of a
         * category-2 register has to be represented explicitly in
         * the result.
         */
        bits.set(i, unsignedFitsInNibble(reg.getReg() +
                                         reg.getCategory() - 1));
    }

    return bits;
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:22,代码来源:Form35c.java

示例4: isCompatible

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    if (!((insn instanceof CstInsn) &&
          (regs.size() == 2) &&
          unsignedFitsInNibble(regs.get(0).getReg()) &&
          unsignedFitsInNibble(regs.get(1).getReg()))) {
        return false;
    }

    CstInsn ci = (CstInsn) insn;
    int cpi = ci.getIndex();

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

    Constant cst = ci.getConstant();
    return (cst instanceof CstType) ||
        (cst instanceof CstFieldRef);
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:23,代码来源:Form22c.java

示例5: writeTo

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    int cpi = ((CstInsn) insn).getIndex();

    write(out,
          opcodeUnit(insn, regs.get(0).getReg()),
          (short) cpi);
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:11,代码来源:Form21c.java

示例6: compatibleRegs

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    BitSet bits = new BitSet(2);
    int r0 = regs.get(0).getReg();
    int r1 = regs.get(1).getReg();

    switch (regs.size()) {
      case 2: {
        bits.set(0, unsignedFitsInNibble(r0));
        bits.set(1, unsignedFitsInNibble(r1));
        break;
      }
      case 3: {
        if (r0 != r1) {
            bits.set(0, false);
            bits.set(1, false);
        } else {
            boolean dstRegComp = unsignedFitsInNibble(r1);
            bits.set(0, dstRegComp);
            bits.set(1, dstRegComp);
        }

        bits.set(2, unsignedFitsInNibble(regs.get(2).getReg()));
        break;
      }
      default: {
        throw new AssertionError();
      }
    }

    return bits;
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:35,代码来源:Form12x.java

示例7: compatibleRegs

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    BitSet bits = new BitSet(1);

    bits.set(0, unsignedFitsInByte(regs.get(0).getReg()));
    return bits;
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:10,代码来源:Form21t.java

示例8: isCompatible

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    return (insn instanceof SimpleInsn) &&
        (regs.size() == 1) &&
        unsignedFitsInByte(regs.get(0).getReg());
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:9,代码来源:Form11x.java

示例9: compatibleRegs

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public BitSet compatibleRegs(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    BitSet bits = new BitSet(2);

    bits.set(0, unsignedFitsInNibble(regs.get(0).getReg()));
    bits.set(1, unsignedFitsInNibble(regs.get(1).getReg()));
    return bits;
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:11,代码来源:Form22c.java

示例10: isCompatible

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();

    return (insn instanceof SimpleInsn) &&
        (regs.size() == 3) &&
        unsignedFitsInByte(regs.get(0).getReg()) &&
        unsignedFitsInByte(regs.get(1).getReg()) &&
        unsignedFitsInByte(regs.get(2).getReg());
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:12,代码来源:Form23x.java

示例11: writeTo

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    int value =
        ((CstLiteralBits) ((CstInsn) insn).getConstant()).getIntBits();

    write(out,
          opcodeUnit(insn, makeByte(regs.get(0).getReg(), value & 0xf)));
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:11,代码来源:Form11n.java

示例12: writeTo

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    int offset = ((TargetInsn) insn).getTargetOffset();

    write(out,
          opcodeUnit(insn, regs.get(0).getReg()),
          (short) offset);
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:11,代码来源:Form21t.java

示例13: insnArgString

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public String insnArgString(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    CstLiteralBits value = (CstLiteralBits) ((CstInsn) insn).getConstant();

    return regs.get(0).regString() + ", " + literalBitsString(value);
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:9,代码来源:Form51l.java

示例14: writeTo

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void writeTo(AnnotatedOutput out, DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    long value =
        ((CstLiteral64) ((CstInsn) insn).getConstant()).getLongBits();

    write(out, opcodeUnit(insn, regs.get(0).getReg()), value);
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:10,代码来源:Form51l.java

示例15: insnArgString

import com.android.dx.dex.code.DalvInsn; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public String insnArgString(DalvInsn insn) {
    RegisterSpecList regs = insn.getRegisters();
    return regs.get(0).regString() + ", " + branchString(insn);
}
 
开发者ID:johnlee175,项目名称:dex,代码行数:7,代码来源:Form31t.java


注:本文中的com.android.dx.dex.code.DalvInsn.getRegisters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。