Skip to content
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

RISC-V CSR output #1690

Merged
merged 2 commits into from
Mar 7, 2021
Merged

RISC-V CSR output #1690

merged 2 commits into from
Mar 7, 2021

Conversation

rth7680
Copy link
Contributor

@rth7680 rth7680 commented Sep 17, 2020

This fixes e.g.

cstool riscv64 "73500034"

which currenly prints non-ascii garbage

cstool riscv64 "73500034" | od -c
0000000 0 7 3 5 0 0 0 3 4
0000020 c s r w i \t , $ 003 $ 003 0 \n
0000040

which is a combination of printing nothing at all for the csr, and erroneously printing internal operand numbers for aliases.

We do not want to append the entire string, only the
single non-argument character.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
While upstream LLVM probably has a tablegen thing for these
somewhere, the current import doesn't include them.  Take the
list from riscv-privileged-v1.10.pdf.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
@TobiasFaller
Copy link
Contributor

TobiasFaller commented Sep 18, 2020

@rth7680 Great. That is exactly what I encountered when testing the RISC-V implementation yesterday. The Python binding fails to parse the resulting string as ASCII and therefore fails too. I hope this gets merged soon.

@pranith
Copy link
Contributor

pranith commented Mar 4, 2021

Can you please create a new PR on libcapstone?

@pranith
Copy link
Contributor

pranith commented Mar 5, 2021

@aquynh LGTM. Please merge.

@aquynh aquynh merged commit ba02674 into capstone-engine:next Mar 7, 2021
@aquynh
Copy link
Collaborator

aquynh commented Mar 7, 2021

merged, thanks!

@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants