Code example for BitSet

Methods: set

0
 
    /** {@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;
    } 
 
    /** {@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);
    } 
}