[Libre-soc-bugs] [Bug 979] Implement C-based Power ISA decoder compiler
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sun Sep 3 09:00:32 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=979
--- Comment #28 from Dmitry Selyutin <ghostmansd at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #27)
> (In reply to Dmitry Selyutin from comment #24)
>
> gooood. the non-portable extensions (callbacks) were (hypothesis) because
> of a lack of thoroughness in insndb [?]
Naaah, that was just an attempt to make their special case a common one. They
call callbacks when they have it; my first idea was just to call it
unconditionally. Then I revisited this place and thought that there's no real
need to call something unconditionally (yet creating one or two additional
tables) when this can be converted to direct jumps to code. That is, why bother
jumping to data and hope it'd be optimized when we can just jump to the code
directly? :-)
Any approach can be done, but jumping to the code location makes it even
simpler. Speaking of non-portable extensions, we could've even have this:
{
static void *table[] = { &&operand_0, &&operand_1, &&operand_3 };
goto *table[id];
operand_0:
/* code 0 */
operand_1:
/* code 1 */
}
But, in the end of the day, it's just the same as switch, just highly
non-portable one. I'm happy with the switch for now. :-)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list