Add HPPA(PA-RISC) architecture#2265
Conversation
869c921 to
2801b9d
Compare
Rot127
left a comment
There was a problem hiding this comment.
Left some suggestions. Good work!
df81978 to
09462b9
Compare
c0bbf93 to
2986c20
Compare
There was a problem hiding this comment.
Good job!
I added many comments, though some are duplicates and none of them should be much work.
Just many tiny things.
Please, when you have resolved all of them, we need to do at least two more things:
- Add HPPA to the
.github/labeler.yml - Run
clang-formaton all.cand.hfiles. The formatting is a little messed up. There is a.clang-formatfile in the repo root. Please use this one. - Fuzzing. Every byte combination from
0x0-0xffffffffshould work without segfault. Please, apply the following patch:and test with and without details:diff --git a/cstool/cstool.c b/cstool/cstool.c index 2240ce132..4b6b62887 100644 --- a/cstool/cstool.c +++ b/cstool/cstool.c @@ -607,6 +607,19 @@ int main(int argc, char **argv) cs_option(handle, CS_OPT_DETAIL, CS_OPT_DETAIL_REAL); } + uint32_t bytes = 0xffffffff; + while (address == 0xffffffff) { + printf("\r0x%08x\t\t", bytes); + fflush(stdout); + count = cs_disasm(handle, (uint8_t*)&bytes, 4, address, 0, &insn); + if (insn && insn->detail) + free(insn->detail); + free(insn); + bytes++; + if (bytes == 0xffffffff) + return 0; + } + count = cs_disasm(handle, assembly, size, address, 0, &insn); if (count > 0) { size_t i;
./cstool -d hppa11 0 0xffffffff ./cstool hppa11 0 0xffffffff ./cstool -d hppa20w 0 0xffffffff ./cstool hppa20w 0 0xffffffff
|
@R33v0LT Please request my review when you're done. Checking the changes in total is easier. |
|
Almost forgot, please add the HPPA files to the |
Done without faults |
Rot127
left a comment
There was a problem hiding this comment.
Found a few more. Please fix them as well.
kabeor
left a comment
There was a problem hiding this comment.
Looks really good, thank you again! Merged.
This PR adds HPPA 1.1/2.0 support
A checklist of necessary steps before changing the state from the draft: