49a50,68
> def format CBOp(code, *opt_flags) {{
> imm_code = """
> imm = CIMM5<2:1> << 1 |
> CIMM3<1:0> << 3 |
> CIMM5<0:0> << 5 |
> CIMM5<4:3> << 6;
> if (CIMM3<2:2> > 0)
> imm |= ~((int64_t)0xFF);
> """
> regs = ['_srcRegIdx[0]','_srcRegIdx[1]']
> iop = InstObjParams(name, Name, 'ImmOp<int64_t>',
> {'code': code, 'imm_code': imm_code,
> 'regs': ','.join(regs)}, opt_flags)
> header_output = BranchDeclare.subst(iop)
> decoder_output = ImmConstructor.subst(iop)
> decode_block = BasicDecode.subst(iop)
> exec_output = BranchExecute.subst(iop)
> }};
>