On Mon, Mar 01, 2021 at 11:08:15PM +0900, Masami Hiramatsu wrote:

> +     default:
> +             if ((opcode & 0xf0) == 0x70) {
> +                     /* 1 byte conditional jump */
> +                     p->ainsn.emulate_op = kprobe_emulate_jcc;
> +                     p->ainsn.jcc.type = opcode & 0xf;
> +                     p->ainsn.rel32 = *(char *)insn->immediate.bytes;
> +             }
>       }

Would it make sense to write that as:

        case 0x70 ... 0x7f:
                /* 1 byte conditional jump */
                p->ainsn.emulate_op = kprobe_emulate_jcc;
                p->ainsn.jcc.type = opcode & 0xf;
                p->ainsn.rel32 = *(char *)insn->immediate.bytes;
                break;

instead? Preferably right before the 0x0f case :-)

Reply via email to