Skip to content

fix: use is_reg for devisor in emit_muldivmod#140

Merged
qmonnet merged 1 commit into
qmonnet:mainfrom
hsqStephenZhang:fix/jit_div
Feb 5, 2026
Merged

fix: use is_reg for devisor in emit_muldivmod#140
qmonnet merged 1 commit into
qmonnet:mainfrom
hsqStephenZhang:fix/jit_div

Conversation

@hsqStephenZhang

@hsqStephenZhang hsqStephenZhang commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

should not use ins.imm != 0 to decide if it's a register operation

see: https://github.com/iovisor/ubpf/blob/d8af62f3a5f720d74a1d84ce6b94b86fb7c7cb10/vm/ubpf_jit_x86_64.c#L1299

@qmonnet qmonnet left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

The change looks good. This code was initially derived from uBPF, but there was indeed an issue: iovisor/ubpf#448 and Alan addressed it in iovisor/ubpf#449.

Can you please sign-off your commit?

Signed-off-by: hsqStephenZhang <stephenzhang666666@gmail.com>
@hsqStephenZhang

Copy link
Copy Markdown
Contributor Author

Done.

@qmonnet qmonnet left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@qmonnet qmonnet merged commit 58e50aa into qmonnet:main Feb 5, 2026
7 of 8 checks passed
@hsqStephenZhang

Copy link
Copy Markdown
Contributor Author

Hi, would you mind publishing a new patch version?

@qmonnet

qmonnet commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Sure, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants