49a50,71
> def format CJOp(code, *opt_flags) {{
> regs = ['_destRegIdx[0]', '_srcRegIdx[0]']
> imm_code = """
> imm = CJUMPIMM3TO1 << 1 |
> CJUMPIMM4TO4 << 4 |
> CJUMPIMM5TO5 << 5 |
> CJUMPIMM6TO6 << 6 |
> CJUMPIMM7TO7 << 7 |
> CJUMPIMM9TO8 << 8 |
> CJUMPIMM10TO10 << 10;
> if (CJUMPIMMSIGN)
> imm |= ~((int64_t)0x7FF);
> """
> 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)
> }};
>