Skip to content

[c166] Fixes for asm and analysis - #6819

Merged
wargio merged 1 commit into
rizinorg:devfrom
SSharshunov:c166_fix_analysis
Oct 8, 2026
Merged

wargio merged 1 commit into
rizinorg:devfrom
SSharshunov:c166_fix_analysis

Conversation

@SSharshunov

@SSharshunov SSharshunov commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

Architecture changes from C166 have been moved from #6453 and #6553

This PR improves instruction parsing, disassembly, and analysis accuracy for the Infineon C166 architecture family:

  • Disassembler fixes: Corrected decoding logic and operand handling for C166/C167 opcodes to prevent incorrect instruction rendering.
  • Analysis enhancements: Fixed control-flow calculations, instruction types, and register/flag mutations to ensure proper function profiling and basic block splitting.
  • Test coverage: Updated existing test suites and added new test cases in rz-test to ensure regression coverage for C166 disassembly and analysis.

Test plan

  • Ran rz-test targeting C166 tests: all passed without regressions.

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.05907% with 156 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.38%. Comparing base (1f9de7e) to head (fbfc0f5).

Files with missing lines Patch % Lines
librz/bin/p/bin_c166.c 67.71% 19 Missing and 22 partials ⚠️
librz/bin/p/bin_omf166.c 68.13% 11 Missing and 18 partials ⚠️
librz/bin/format/omf/omf.c 76.31% 1 Missing and 17 partials ⚠️
librz/arch/p/analysis/analysis_c166.c 88.43% 12 Missing and 5 partials ⚠️
librz/arch/isa/c166/c166_disas.c 90.69% 9 Missing and 3 partials ⚠️
librz/bin/format/c166/c166_raw.c 69.23% 8 Missing and 4 partials ⚠️
librz/bin/p/bin_omf.c 52.63% 3 Missing and 6 partials ⚠️
librz/arch/isa/c166/c166_common.c 80.00% 7 Missing ⚠️
librz/bin/format/omf/omf166.c 76.19% 5 Missing ⚠️
librz/arch/omf_process.c 71.42% 1 Missing and 3 partials ⚠️
... and 2 more
Additional details and impacted files
Files with missing lines Coverage Δ
librz/arch/isa/c166/c166_disas.h 66.66% <ø> (-14.59%) ⬇️
librz/bin/p/bin_ningb.c 42.06% <100.00%> (ø)
librz/arch/isa/c166/c166_common.h 83.33% <83.33%> (ø)
librz/arch/p/asm/asm_c166.c 84.44% <83.33%> (+0.87%) ⬆️
librz/arch/omf_process.c 66.50% <71.42%> (-0.33%) ⬇️
librz/bin/format/omf/omf166.c 64.77% <76.19%> (+0.11%) ⬆️
librz/arch/isa/c166/c166_common.c 80.00% <80.00%> (ø)
librz/bin/p/bin_omf.c 64.94% <52.63%> (-1.55%) ⬇️
librz/arch/isa/c166/c166_disas.c 91.58% <90.69%> (+1.16%) ⬆️
librz/bin/format/c166/c166_raw.c 69.23% <69.23%> (ø)
... and 4 more

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f9de7e...fbfc0f5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SSharshunov SSharshunov changed the title Fixes for asm and analyzis [c166] [c166] Fixes for asm and analyzis Sep 30, 2026

@notxvilka notxvilka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please rebase and mark as ready for the review once it's done (if it's truly ready though).

@SSharshunov
SSharshunov marked this pull request as ready for review October 8, 2026 06:53
@wargio wargio changed the title [c166] Fixes for asm and analyzis [c166] Fixes for asm and analisys Oct 8, 2026
@wargio wargio changed the title [c166] Fixes for asm and analisys [c166] Fixes for asm and analysis Oct 8, 2026
@wargio
wargio merged commit 87ce9ae into rizinorg:dev Oct 8, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants