本文整理汇总了Java中com.android.dx.rop.cst.CstLiteral64类的典型用法代码示例。如果您正苦于以下问题:Java CstLiteral64类的具体用法?Java CstLiteral64怎么用?Java CstLiteral64使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CstLiteral64类属于com.android.dx.rop.cst包,在下文中一共展示了CstLiteral64类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isCompatible
点赞 2
import com.android.dx.rop.cst.CstLiteral64; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean isCompatible(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
if (!((insn instanceof CstInsn) &&
(regs.size() == 1) &&
unsignedFitsInByte(regs.get(0).getReg()))) {
return false;
}
CstInsn ci = (CstInsn) insn;
Constant cst = ci.getConstant();
return (cst instanceof CstLiteral64);
}
开发者ID:JLLK,
项目名称:multidex-maker,
代码行数:16,
代码来源:Form51l.java
示例2: writeTo
点赞 2
import com.android.dx.rop.cst.CstLiteral64; //导入依赖的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
示例3: literalBitsComment
点赞 2
import com.android.dx.rop.cst.CstLiteral64; //导入依赖的package包/类
/**
* Helper method to return a literal bits comment string.
*
* @param value the value
* @param width the width of the constant, in bits (used for displaying
* the uninterpreted bits; one of: {@code 4 8 16 32 64}
* @return {@code non-null;} the comment
*/
protected static String literalBitsComment(CstLiteralBits value,
int width) {
StringBuffer sb = new StringBuffer(20);
sb.append("#");
long bits;
if (value instanceof CstLiteral64) {
bits = ((CstLiteral64) value).getLongBits();
} else {
bits = value.getIntBits();
}
switch (width) {
case 4: sb.append(Hex.uNibble((int) bits)); break;
case 8: sb.append(Hex.u1((int) bits)); break;
case 16: sb.append(Hex.u2((int) bits)); break;
case 32: sb.append(Hex.u4((int) bits)); break;
case 64: sb.append(Hex.u8(bits)); break;
default: {
throw new RuntimeException("shouldn't happen");
}
}
return sb.toString();
}
开发者ID:JLLK,
项目名称:multidex-maker,
代码行数:36,
代码来源:InsnFormat.java