Search in sources :

Example 1 with CstLiteral64

use of com.android.dx.rop.cst.CstLiteral64 in project buck by facebook.

the class Form51l method writeTo.

/** {@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);
}
Also used : CstLiteral64(com.android.dx.rop.cst.CstLiteral64) RegisterSpecList(com.android.dx.rop.code.RegisterSpecList)

Example 2 with CstLiteral64

use of com.android.dx.rop.cst.CstLiteral64 in project buck by facebook.

the class Form51l method isCompatible.

/** {@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);
}
Also used : CstInsn(com.android.dx.dex.code.CstInsn) Constant(com.android.dx.rop.cst.Constant) CstLiteral64(com.android.dx.rop.cst.CstLiteral64) RegisterSpecList(com.android.dx.rop.code.RegisterSpecList)

Example 3 with CstLiteral64

use of com.android.dx.rop.cst.CstLiteral64 in project J2ME-Loader by nikita36078.

the class Form51l method writeTo.

/**
 * {@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);
}
Also used : CstLiteral64(com.android.dx.rop.cst.CstLiteral64) RegisterSpecList(com.android.dx.rop.code.RegisterSpecList)

Example 4 with CstLiteral64

use of com.android.dx.rop.cst.CstLiteral64 in project J2ME-Loader by nikita36078.

the class Form51l method isCompatible.

/**
 * {@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);
}
Also used : CstInsn(com.android.dx.dex.code.CstInsn) Constant(com.android.dx.rop.cst.Constant) CstLiteral64(com.android.dx.rop.cst.CstLiteral64) RegisterSpecList(com.android.dx.rop.code.RegisterSpecList)

Aggregations

RegisterSpecList (com.android.dx.rop.code.RegisterSpecList)4 CstLiteral64 (com.android.dx.rop.cst.CstLiteral64)4 CstInsn (com.android.dx.dex.code.CstInsn)2 Constant (com.android.dx.rop.cst.Constant)2