[Libre-soc-bugs] [Bug 550] binutils support needed for svp64

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jan 16 20:45:21 GMT 2022


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

--- Comment #81 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to dmitry.selyutin from comment #80)

> into single 64-bit macros, like you suggest above. My point, however, is
> readability: unless there are some portability concerns, there's no need to
> make it less readable, be it machine-generated or not.

again to repeat: space and the amount of time taken to complete is a priority.
binutils is extremely low-level and it will be expected to have
an above-average level of optimisation that cannot unfortunately be ignored.

> So I'll think about macros (though I personally find their use for such
> purpose quite awful outside of e.g. network programming), but mostly because
> of least surprise principle. I'm not convinced of other reasons. As for
> having a copy of uint64_t in PPC, I think there must be a pointer to SVP64
> entry.

no: to repeat again: there is no need. if it was more than 64 bits of
information, then yes a pointer would be needed.  i have said three
times that there will never be more than the 64 bits of information.

> On 64-bit machine, "size of(struct svp64_entry)" would be 24 bytes. If we
> drop the "struct svp64_opcode" part, that'd be 16 bytes (we have 300 or so
> entries since recent). For each PPC entry, if we keep a pointer or 64-bit
> int, it'd add 8 bytes per entry. I don't see a problem here.

again: this means extra processing power required, first to access the
pointer and second to access the contents of the pointer.

whereas providing the 64-bit value directly as the sole exclusive value
that is never going to be extended beyond those 64 bits is much more
efficient.

binutils is unfortunately a suite of programs where optimisation matters
due to the sheer overwhelming size of the task it carries out.

when sub-optimal code is presented to the binutils team for inclusion
they will immediately pick up on it and request it to be made acceptable.
therefore we might as well make the effort 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