[Libre-soc-bugs] [Bug 1154] Support basic PowerPC generated assembly

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Sep 13 22:02:56 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1154

--- Comment #18 from Dmitry Selyutin <ghostmansd at gmail.com> ---
Hooray! The small opid-check binary is now capable of cross-checking assembly
and disassembly. The flow is the following:

1. List all instructions along with their arguments in Python as sequences of
(string, string-tuple).
2. Assemble all such instructions via insndb and output into a temporary
unnamed file the object code.
3. Feed this code to opid-check: without arguments, it acts as a disassembler.
opid-check reads its stdin and collects all instructions, then disassembles
them.
4. After comparing the disassembly with the expected output, return the
temporary unnamed file with the object code.
5. Then, once we're done with the disassembly, feed the same instructions into
opid-check assembler mode. opid-check treats its command line arguments as
instructions in form "insn1 arg0 arg1 : insn2 arg0 arg1 arg3". The semicolon is
used as a separator. Then opid-check outputs the object code into stdout,
which, in Python, is another unnamed temporary file.
6. In the end, we compare the code we got at stages 3-4 with the object code
from stage 5.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list