-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Ghidra does not recognize the RISC-V fli.s
instruction
#7451
Comments
I can add fli.s support to the other riscv extension support in PR #5778 if you like. Does the unofficial RISCV Ghidra interest group have any suggestions on the way it is implemented? The default solution involves adding sleigh definitions for the zfa extension such that Ghidra's disassembler matches the binutils test cases There are some design questions here:
|
My two cents:
|
@GhidorahRex - thanks! I can work within those suggestions. Pushing details into the pcodeops swamp is the right thing to do so long as nobody expects to drain that swamp (type inference, context management, user rules and transforms, ...) anytime soon. |
I expect to push supporting code to https://github.com/thixotropist/ghidra/tree/isa_ext later this week. Here's what your Most of the zfa extension implements semantics that Ghidra doesn't attempt to handle - exception generation, rounding options, NaN processing, and quad- and half-precision floating point. I've taken the lazy approach of adding just enough to the sleigh semantics to let the Ghidra user glance at the decompiler window and decide whether or not they care about a code block. In your test case, that means adding a user pcodeop so that the decompiler shows a constant is loaded but not bothering to show what that constant was. A glance at the disassembler window will show that answer. The new zfa support in That means I've added semantics for half- and quad-precision floating point instructions that are incorrect from an emulation point of view, often using the semantics of vanilla single or double precision ops instead. |
Awesome news, thank you for your work. |
I've pushed draft support for zfa to https://github.com/thixotropist/ghidra/tree/isa_ext, a Ghidra fork collecting many riscv instruction set extensions. There is a long-running PR #5778 under review by @GhidorahRex. If accepted, this support will be merged into the master branch and then part of a formal release. Other possible paths forward:
|
Is your feature request related to a problem? Please describe.
Ghidra does not recognize the RISC-V
fli.s
instruction which is part of the standard Zfa extension.Ghidra listing:
test.zip
Describe the solution you'd like
The machine code is disassembled into
fli.s
.Describe alternatives you've considered
N/A
Additional context
I think none of the Zfa extension instructions are recognized.
The text was updated successfully, but these errors were encountered: