-
Notifications
You must be signed in to change notification settings - Fork 94
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/riscv32i: define registers #2743
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2743 +/- ##
==========================================
- Coverage 73.70% 73.68% -0.03%
==========================================
Files 249 250 +1
Lines 57866 57889 +23
==========================================
+ Hits 42650 42654 +4
- Misses 15216 15235 +19 ☔ View full report in Codecov by Sentry. |
if index < N_GP_REGISTERS { | ||
&self.general_purpose[index] | ||
} else if index == REGISTER_CURRENT_IP { | ||
&self.current_instruction_pointer | ||
} else if index == REGISTER_NEXT_IP { | ||
&self.next_instruction_pointer | ||
} else if index == REGISTER_HEAP_POINTER { | ||
&self.heap_pointer | ||
} else { | ||
panic!("Index out of bounds"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nbd since ip, nip, and the heap ptr are artificial, but it is a bit awkward that 32 isn't an index in the range.
Import commits from #2727