-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HPPA(PA-RISC) architecture #2265
Conversation
869c921
to
2801b9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions. Good work!
df81978
to
09462b9
Compare
c0bbf93
to
2986c20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-format
on all.c
and.h
files. The formatting is a little messed up. There is a.clang-format
file in the repo root. Please use this one. - Fuzzing. Every byte combination from
0x0-0xffffffff
should 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a few more. Please fix them as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
@kabeor Please take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: