[Libre-soc-bugs] [Bug 980] Implement C-based Power ISA pseudocode compiler

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Dec 6 17:43:23 GMT 2023


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

--- Comment #31 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #28)
> The result is:
> 
>     if RA <u RB then
>         RT <- RA + RB
>         NIA <-iea CALL(RA, CALL(RB))
>     else
>         NIA <-iea CIA

nice! already! that will come in handy for debug purposes during
AST-Node-morphing/manipulation (why astor has a dump function)

(In reply to Dmitry Selyutin from comment #29)

>     @Hook(If)
>     def If(self, node):
>         yield node
>         stmt = " ".join(["if", str(self[node.test]), "then"])

...
...

quite ridiculously clear and simple, isn't it?

> As you see, each node gets some code object associated with it. The code
> object has an emit method, which feeds yet another statement considering the
> current indentation level for it.

very cool.

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


More information about the libre-soc-bugs mailing list