Skip to content

Commit

Permalink
Use flag instead of imm value to determine if this is register to reg…
Browse files Browse the repository at this point in the history
…ister operation (#449)

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Co-authored-by: Alan Jowett <alan.jowett@microsoft.com>
  • Loading branch information
Alan-Jowett and Alan Jowett committed May 7, 2024
1 parent 0a50b44 commit 5d4d78d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/ubpf_jit_x86_64.c
Expand Up @@ -819,7 +819,7 @@ muldivmod(struct jit_state* state, uint8_t opcode, int src, int dst, int32_t imm
}

// Load the divisor into RCX.
if (imm) {
if (!reg) {
emit_load_imm(state, RCX, imm);
} else {
emit_mov(state, src, RCX);
Expand Down

0 comments on commit 5d4d78d

Please sign in to comment.