Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: clarify signed & unsigned for jump insts #119

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hsqStephenZhang
Copy link

content

fix the signed/unsigned comparisons in several jump instructions in the execute_program function

Key changes include:

  • Added a new macro unsigned_u64! to convert immediate values to unsigned 64-bit integers (i can be simply written as inst.imm as u32 as u64, the macro is just for better readability, i can change it back to the simpler version if you wish)
  • Updated the implementation of several jump instructions (JEQ_IMM, JGT_IMM, JGE_IMM, JLT_IMM, JLE_IMM, JNE_IMM) to use the new unsigned_u64! macro, ensuring correct handling of unsigned comparisons.

reference

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.

1 participant