[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 16:31:47 BST 2023


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

--- Comment #53 from Dmitry Selyutin <ghostmansd at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #52)
> could you do say... mmm...
> 3-4 instructions that demonstrate how to use it? with real simple
> "exit(-1)" if fail and exit(0) if true on verifying that the operands
> decode correctly?

No, if we do it, we'll do it correctly. I'll come back with something which can
be used to check (almost) arbitrary instructions. I have an idea on how to do
it so that this will be a cross-check. Otherwise there's no point in
illustrating the API with 3-4 instructions, since for now API is dead simple
and completely self-explanatory. Tests, on the other hand, are much a better
idea.

> the other alternative is to also auto-generate a *python c-module*
> interface on top, and we can then accelerate *ISACaller* by importing
> it, replace PowerDecoder entirely (hooray).

Using your own wording, I'd say that's a hell of a little of money for such a
big work, and I am therefore uncomfortable starting it in scope of this task.
:-)

> for such a short amount of code, and i am therefore uncomfortable
> signing it off. i do appreciate the Visitor system is that powerful,
> but it in turn means we can achieve more with less (our key strategy)

Luke, I have to stop at this paragraph, even though I'm not comfortable doing
it. Judging the payment based on the code size is a totally wrong metric, which
will likely yield not the outcome you expect. The fact that you see this code
the way it looks like is because there were _many_ efforts before this code
came to life. Don't think it was easy, because in reality wasn't, quite the
contrary. It ended up simpler I expected, that's true, but it was not a simple
5-minute job.

I ask you, please, don't ever, ever use this as an argument. The only possible
outcome we could gain from such strategy is that people would write more code
only to justify the payment. Or they might think against writing it at all. I'm
writing this, because I've seen this metric in action, and I know the outcome
pretty well. Again: please don't use this as an argument, ever.


So, to summarize: I'll return with something to be used for testing purposes,
because this is The Right Thing To Do. This decision has nothing to do with the
nonsensical argument about the code size.

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


More information about the libre-soc-bugs mailing list