Friday, 2021-01-22

*** vup2 is now known as vup01:07
*** mepy <mepy!~mepy@151.75.96.251> has left #libre-soc11:39
lkcllxo: ping.15:13
lkclquestion for you: would you be happy to do a python-based "translator" from binutils-style svp64 syntax into ".long 0xnnnnn; opcodev3.0b"?15:14
lkclit's for use in the unit tests like this:15:14
lkclhttps://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/alu/test/test_pipe_caller.py;h=92c12f632fdea9b382fdb18d2f7d00200fb39fa1;hb=3518c40bb13ea2c5bb036045afadf19bb04fc270#l5415:15
lkclso that would be:15:15
lkcllst = SVP64translator(["sv.extsw r3.v, r0.s"])15:16
lkcland the output would be:15:16
lkcl[".long 0xnnnnn", "extsw 3, 0"]15:17
lkclthe context needs to be "picked up" - the mode - unfortunately - by doing a lookup in the CSV output from the deduped opcodes program sv_analyse.py15:18
lkclhttps://libre-soc.org/openpower/opcode_regs_deduped/15:18
lkclend of this file https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv_analysis.py;hb=HEAD15:19
lkcland the SVP64translator can read those CSV files, create a dictionary by assembly-code name (first column in the CSV file) and look that up to find what the "mode" is, EXTRA2 or EXTRA3 etc.15:21
lxolkcl, I suppose I could do that.  my primary concern is that it amounts to duplicating pretty much all of the opcode & operand parsing code from binutils.  it's a substantial amount of code15:53
lxomakes me wonder if it's not more sensible to just do it in binutils proper15:54
lxoOTOH, I can see how the svp-specific transformations would be easier to do in python16:02
lkclthat was my thoughts, and it has the advantage of understanding and rapid prototyping, getting everything straight before going to binutils.. but being able to use *unmodified* binutils, right now.17:24
lkclit shouuuld be possible to use sv_analyse.py to auto-generate header files and/or other data structures for use in binutils when it comes to it, saving a huge amount of work17:24
lkclurr i just learned that power-gem5 doesn't have the remote gdb support we need.  gem5 has the underlying concept (base classes) just not the over-rides needed17:25
lxoshould this binutils work take priority over the compiler one (558)?  I was planning to return to the latter today, after catching up with emails I haven't even looked at yet17:27
lxoI'm glad to tackle them both, and to address first whatever would be most useful first17:28
lkclpython class first, binutils next, gcc third.17:34
lkclbecause the python class can be used *right now*, binutils will take a bit of time, and gcc is critically dependent on binutils17:35

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!