Veera[m] | Hi | 09:54 |
---|---|---|
Veera[m] | ghostmansd[m]: lkcl: Bug 838, What has to be done. I cannot make it out? | 09:57 |
programmerjake | hi, though since i'm going to sleep, bye! | 09:58 |
ghostmansd[m] | lkcl, does anything uses sv/trans/svp64.py as usual script? | 19:55 |
ghostmansd[m] | I see it can be used under name pysvp64asm | 19:55 |
ghostmansd[m] | I'd like to teach it to convert the code from stdin to stdout on-the-fly | 19:55 |
ghostmansd | considering this code... | 19:59 |
ghostmansd | sv.fcoss. 20.v, 0.v # coco | 19:59 |
ghostmansd | # jumbo | 19:59 |
ghostmansd | ... | 19:59 |
ghostmansd | I'd expected this output | 20:01 |
ghostmansd | .long 0x05402400 | 20:01 |
ghostmansd | .long 0xeca0045d | 20:01 |
*** ghostmansd <ghostmansd!~ghostmans@broadband-188-32-220-29.ip.moscow.rt.ru> has left #libre-soc | 20:01 | |
ghostmansd | or, better, considering this... | 20:02 |
ghostmansd | sv.add. 5.v, 2.v, 1.v # coco | 20:02 |
ghostmansd | # jumbo | 20:02 |
ghostmansd | ... | 20:02 |
ghostmansd | I'd have expected this: | 20:02 |
ghostmansd | .long 0x05402ea0 | 20:02 |
ghostmansd | add. 1, 0, 0 | 20:02 |
ghostmansd | instead I see unchanged sv. insns | 20:03 |
ghostmansd | sv.add. 5.v, 2.v, 1.v # coco | 20:04 |
ghostmansd | # jumbo | 20:04 |
ghostmansd | potential = ls[1].strip() | 20:25 |
ghostmansd | if not potential.startswith("sv."): | 20:26 |
ghostmansd | this is clearly strange, because `ls` might be result of `line.split("#")` | 20:26 |
ghostmansd | and, for case like 'sv.add. 5.v, 2.v, 1.v # coco\n', this will check stuff after the comment; this is clearly wrong | 20:27 |
ghostmansd | however, if I replace `potential = ls[1].strip()` with `potential = ls[1].strip()`, it works | 20:28 |
ghostmansd | programmerjake, this is your code, any particular thoughts?... src/openpower/sv/trans/svp64.py | 20:28 |
ghostmansd | I've pushed the changes I did for now; they're trivial to rollback, should the rollback be required | 20:31 |
ghostmansd | what I did is: 1) replaced prints with logger; 2) simplified stdin/stdout processing; 3) fixed (o'rly?) the "potential" assignment | 20:32 |
ghostmansd | the only part which can break stuff is 3) | 20:32 |
ghostmansd | ping me if it breaks anything | 20:32 |
ghostmansd | I need this for 838 and for checking binutils asm when I'll write binutils-exclusive tests | 20:33 |
programmerjake | i don't recall writing that, your changes look fine to me | 20:52 |
Veera[m] | ghostmansd: Bug 838. Hey can you tell me where to start! | 21:10 |
lkcl | ghostmansd, go for it. | 21:11 |
lkcl | long story, for pysvp64asm you have to put "# sv.xxxx" not "sv.xxxx" | 21:12 |
lkcl | Veera[m], there's an easier one to start with https://bugs.libre-soc.org/show_bug.cgi?id=839 | 21:14 |
lkcl | the diagrams from here https://libre-soc.org/openpower/sv/SimpleV_rationale/ | 21:15 |
lkcl | i need to add a couple more | 21:15 |
lkcl | but there are 2 to get started | 21:15 |
Veera[m] | lkcl: https://libre-soc.org/openpower/sv/500xNx2022-05-14_11-55.jpg.pagespeed.ic.2ekfSI7s4m.webp: is this also to be converted to SVG | 21:20 |
lkcl | no i think that one can stay | 21:21 |
Veera[m] | ok | 21:30 |
lkcl | ghostmansd, please do not alter the behaviour of "# sv." search pattern unless also modifying the assembler programs that rely on that. | 21:41 |
lkcl | they're in the media/ directory | 21:41 |
lkcl | the reason for adding the copy of the instruction verbatim afterwards is so that re-running pysvp64asm on the same program *after* it's been run will *re*-substitute the altered comment | 21:43 |
lkcl | otherwise you end up with a one-way process that *destroys* the assembler due to the substitution ".long xxx; v3.0op" | 21:43 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!