Skip to content

harm: ADC/SBC#58

Merged
monoid merged 1 commit into
masterfrom
feat/adc/sbc
Jul 10, 2026
Merged

harm: ADC/SBC#58
monoid merged 1 commit into
masterfrom
feat/adc/sbc

Conversation

@monoid

@monoid monoid commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added support for constructing AArch64 add-with-carry (ADC) instructions.
    • Added support for constructing subtract-with-carry (SBC) instructions.
    • Supports both 32-bit and 64-bit register operands, including zero-register forms.
    • Added instruction encoding validation for supported operand combinations.

@monoid monoid self-assigned this Jul 10, 2026
@monoid monoid added enhancement New feature or request harm The `harm` dynamic assembler labels Jul 10, 2026
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f41a8c16-eda4-42fd-a016-4f2eb1c8e337

📥 Commits

Reviewing files that changed from the base of the PR and between 1ed555e and 1e8f09b.

📒 Files selected for processing (4)
  • harm/src/instructions/arith.rs
  • harm/src/instructions/arith/adc.rs
  • harm/src/instructions/arith/macros.rs
  • harm/src/instructions/arith/sbc.rs

📝 Walkthrough

Walkthrough

Adds public AArch64 ADC and SBC instruction builders with typed 32-bit and 64-bit register operands, shared carry-arithmetic encoding generation, zero-register variants, module exports, and assembly encoding tests.

Changes

Carry arithmetic instructions

Layer / File(s) Summary
Shared carry encoding
harm/src/instructions/arith/macros.rs
Adds define_arith_carry! to generate raw instruction encodings and operand conversions for carry arithmetic.
ADC builder and validation
harm/src/instructions/arith/adc.rs
Adds the typed adc constructor, Adc model, register implementations for both widths, generated encodings, and operand-form tests.
SBC builder and module exports
harm/src/instructions/arith/sbc.rs, harm/src/instructions/arith.rs
Adds the typed sbc constructor, register and zero-register variants, encoding tests, and public adc/sbc module exports.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding ADC and SBC support to harm.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/adc/sbc

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@monoid

monoid commented Jul 10, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@monoid monoid merged commit 71684c7 into master Jul 10, 2026
1 check passed
@monoid monoid deleted the feat/adc/sbc branch July 10, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request harm The `harm` dynamic assembler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant