[Libre-soc-isa] [Bug 908] indexed remap needs defined behavior for out-of-bounds indexes

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Aug 15 00:15:25 BST 2022


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

--- Comment #1 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #0)
> we need indexed move to have *defined* behavior, imho out-of-bounds being
> undefined behavior is unacceptable:

briefly, more tomorrow i lost a reply: yes it is.
the cost in hardware is too great.

Indexed REMAP goes literally in the Issue Phase.
any gates added there can damage performance.
i specifically designed it so that the implementor
may cache the Indices then completely ignore normal
Register Hazards, safe that the programmer knows
what to expect and what not to do.

wasm swizxle, good for them, not relevant. swizzle
is static, this is dynamic.

pwrfectly valid for programmer to set very first
Index to MAXVL-1.  loop goes round, last one has
VL<MAXVL, urk, the damn thing breaks expectations,
the indices get silently maxed??

no.

Traps are the worst thing to do as well, those require
Shadow Matrix Entries.  a hot-loop triggers Traps?

no.

this is a high cost area that has to prioritise
Hardware expediency over "niceness of the API".
sometimes it is just too costly to do "nice"

it is very late here: a useful exercise which you
could do would be to thimk through how to mitigate
VL being set to a value less than the programmer
expects the Indices to contain, perhaps by creating
a predicate mask from sv.cmp on VL against the
indices.

such thought experiments would form the basis of
application notes as well as ISA WG justification

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


More information about the Libre-SOC-ISA mailing list