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

o1vm/riscv32: implement mod_signed #2801

Open
wants to merge 1 commit into
base: dw/o1vm/riscv32/implement-m-type-div
Choose a base branch
from

Conversation

dannywillems
Copy link
Member

It will be used to implement MInstruction::Rem in a follow-up PR.

It will be used to implement MInstruction::Rem in a follow-up PR.
Comment on lines +509 to +514
let x: u32 = (*x).try_into().unwrap();
let y: u32 = (*y).try_into().unwrap();
let res = ((x as i32) % (y as i32)) as u32;
let res = res as u64;
self.write_column(position, res);
res
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let x: u32 = (*x).try_into().unwrap();
let y: u32 = (*y).try_into().unwrap();
let res = ((x as i32) % (y as i32)) as u32;
let res = res as u64;
self.write_column(position, res);
res
let x: i32 = (*x).try_into().unwrap();
let y: i32 = (*y).try_into().unwrap();
let res = x % y;
let res = res as u64;
self.write_column(position, res);
res

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 71.93%. Comparing base (2340ce1) to head (8f304aa).

Files with missing lines Patch % Lines
o1vm/src/interpreters/riscv32im/witness.rs 0.00% 13 Missing ⚠️
o1vm/src/interpreters/riscv32im/constraints.rs 0.00% 8 Missing ⚠️
Additional details and impacted files
@@                           Coverage Diff                            @@
##           dw/o1vm/riscv32/implement-m-type-div    #2801      +/-   ##
========================================================================
- Coverage                                 71.95%   71.93%   -0.02%     
========================================================================
  Files                                       255      255              
  Lines                                     60000    60021      +21     
========================================================================
+ Hits                                      43173    43178       +5     
- Misses                                    16827    16843      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

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