use of com.android.dx.rop.code.RegisterSpecList in project J2ME-Loader by nikita36078.
the class Form21h method insnArgString.
/**
* {@inheritDoc}
*/
@Override
public String insnArgString(DalvInsn insn) {
RegisterSpecList regs = insn.getRegisters();
CstLiteralBits value = (CstLiteralBits) ((CstInsn) insn).getConstant();
return regs.get(0).regString() + ", " + literalBitsString(value);
}
use of com.android.dx.rop.code.RegisterSpecList in project J2ME-Loader by nikita36078.
the class Form21h method insnCommentString.
/**
* {@inheritDoc}
*/
@Override
public String insnCommentString(DalvInsn insn, boolean noteIndices) {
RegisterSpecList regs = insn.getRegisters();
CstLiteralBits value = (CstLiteralBits) ((CstInsn) insn).getConstant();
return literalBitsComment(value, (regs.get(0).getCategory() == 1) ? 32 : 64);
}
use of com.android.dx.rop.code.RegisterSpecList in project J2ME-Loader by nikita36078.
the class Form21s 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();
if (!(cst instanceof CstLiteralBits)) {
return false;
}
CstLiteralBits cb = (CstLiteralBits) cst;
return cb.fitsInInt() && signedFitsInShort(cb.getIntBits());
}
use of com.android.dx.rop.code.RegisterSpecList in project J2ME-Loader by nikita36078.
the class Form21s method compatibleRegs.
/**
* {@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;
}
use of com.android.dx.rop.code.RegisterSpecList in project J2ME-Loader by nikita36078.
the class Form21t method writeTo.
/**
* {@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);
}
Aggregations