Add RZIL support for h8300
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_APIfunction 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).
Detailed description
...
Test plan
...
Closing issues
...
@imbillow Is it fine for you if we mark this PR as "Draft"? I get confused in my notifications.
Codecov Report
:x: Patch coverage is 77.34940% with 470 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 44.85%. Comparing base (fd41e61) to head (2edea18).
:warning: Report is 1 commits behind head on dev.
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| librz/arch/p/asm/asm_h8300.c | 100.00% <100.00%> (ø) |
|
| librz/bin/format/elf/elf_info.c | 71.03% <ø> (ø) |
|
| librz/il/il_reg.c | 61.99% <100.00%> (+0.17%) |
:arrow_up: |
| librz/include/rz_util/rz_bits.h | 100.00% <100.00%> (ø) |
|
| librz/arch/dwarf_process.c | 61.31% <50.00%> (-0.04%) |
:arrow_down: |
| librz/arch/isa/h8300/h8300_dwarf_regnum_table.h | 0.00% <0.00%> (ø) |
|
| librz/arch/isa/h8300/h8300_disas.c | 96.59% <96.40%> (+16.96%) |
:arrow_up: |
| librz/arch/p/analysis/analysis_h8300.c | 86.07% <84.89%> (+85.48%) |
:arrow_up: |
| librz/arch/isa/h8300/h8300_il.c | 78.45% <78.45%> (ø) |
|
| librz/arch/isa/h8300/h8300_esil.c | 36.66% <36.66%> (ø) |
... and 9 files with indirect coverage changes
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update fd41e61...2edea18. Read the comment docs.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
The h8300 is mostly done, but the elf file I compiled with h8300-elf-gcc -mn has h8300h-specific instructions, and considering that h8300h seems to be just an extension of h8300, I'm going to do the two together?
The h8300 is mostly done, but the elf file I compiled with
h8300-elf-gcc -mnhas h8300h-specific instructions, and considering that h8300h seems to be just an extension of h8300, I'm going to do the two together?
Yes, please do it in the same PR.
See https://github.com/rizinorg/rizin/issues/4787
Though, I recommend adding only the minimum necessary in this PR (just H8/300H but not the rest), and other variants in separate PRs.
the main.elf is built using this: https://github.com/celerizer/h8300h-test-rom.git
The thing I am concerned about is, that if some semantics there are wrong, the debugging effort of the bugs emerging from it will be enormous. These bugs are potentially very subtle.
There is H8 emulator but I don't know how good it is: https://github.com/celerizer/libh8300h Maybe it's suitable for the tracetesting, maybe it's not.
However, there doesn't seem to be a good solution. The ISA description is not as strict as the code in some places, and there doesn't seem to be a reliable simulator for h8300 to perform trace tests.
Please send all further improvements as separate PRs. Merged this one. Thank you for this one last blocker (apart from nearly finished SPARC) for ESIL deprecation in analysis!