harm: ADDS/SUBS#57
Conversation
Change arg order, remove unused args.
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe arithmetic instruction modules now expose ADDS and SUBS builders with encoding support and tests. Shared macros and existing ADD/SUB declarations are updated to distinguish destination and source register types across shifted, extended, and immediate forms. ChangesArithmetic instruction builders
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant adds_or_subs
participant MakeTrait
participant RawInstruction
Caller->>adds_or_subs: provide destination and source operands
adds_or_subs->>MakeTrait: call new(...)
MakeTrait->>RawInstruction: construct encoded ADDS or SUBS variant
RawInstruction-->>Caller: return instruction value
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@harm/src/instructions/arith/subs.rs`:
- Line 142: Rename the copied test identifier `untested_adds_db` to
`untested_subs_db` in the `SUBS_DB` declaration so it accurately references
subtraction tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b6f10f9c-6da8-4293-8d61-8e4d161e4ae1
📒 Files selected for processing (6)
harm/src/instructions/arith.rsharm/src/instructions/arith/add.rsharm/src/instructions/arith/adds.rsharm/src/instructions/arith/macros.rsharm/src/instructions/arith/sub.rsharm/src/instructions/arith/subs.rs
Summary by CodeRabbit
New Features
ADDSandSUBSinstructions, including shifted, extended-register, and immediate forms.Bug Fixes
ADDandSUBinstruction variants.