[Libre-soc-bugs] [Bug 979] Implement C-based Power ISA decoder compiler
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Sep 8 18:06:00 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=979
--- Comment #55 from Dmitry Selyutin <ghostmansd at gmail.com> ---
I re-read my comment and came to conclusion it might have given you the wrong
impression. To clarify: adding the test is a perfectly fine and valid idea. The
only item which attracted my attention was this code size thing, so there was
my reaction. Perhaps that was somewhat a bit more exaggerated than needed; if
the comment made that impression, I'm sorry, Luke, I didn't want it to appear
this way.
As for the tests, I actually liked the idea, and the motto of the comment
overall was "that's The Right Thing To Do, I really missed it, thank you for
pointing that!". I've been thinking of the following:
1. Standalone C executable (opid-dis), which is capable of base instruction
decoding (just gets the raw data and outputs in some simple-ish format easy to
parse).
2. Some Python test which builds the instructions, assembles them and then
feeds to opid-dis and gets its output.
3. When opid-dis output is captured, the Python test compares the results to
the expected.
The rationale:
1. Most of the logic is in Python. Checking new instructions and extending the
test is dead simple.
2. opid-dis can be converted into a real disassembler. Not that we actually
need it (perhaps we don't, perhaps we do), but we can grasp what's missing on
API side for somebody who wants a real disassembler.
3. At some later stage, we might opt to use the same approach for the
assembler. I really would like to have both assembly and disassembly generated,
adding each and every instruction to binutils manually is the worst choice.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list