[Libre-soc-dev] Implicit setvli on blr?

Hendrik Boom hendrik at topoi.pooq.com
Mon May 24 13:31:20 BST 2021


On Mon, May 24, 2021 at 10:49:20AM +0100, Luke Kenneth Casson Leighton wrote:
> 
> if you start calling functions from within SVP64 loops, that's something
> that
> gets sufficiently complex that the majority of Cray-style Vector-related
> compilers simply don't do it: the calling conventions alone are a pig to
> define.
> 
> you *can* do it - however if you write a sub-function which critically
> relies on a particular MVL, bear in mind that MVL is a static immediate
> quantity, you'd better make absolutely sure that no callers call that
> function *without* being *ABSOLUTELY* aware of that size, MVL.
> 
> why?
> 
> this should be obvious: MVL literally defines precisely and exactly the
> maximum quantity of registers used by a loop.  exceed that quantity and
> you *will* cause data corruption by over-running statically-allocated
> compile-time register file numbering.

Which raises the spectre of this being effectively undefined behaviour 
which some user accidentally discovers is just what he happens to want 
and is blocked from future developments.

-- hendrik



More information about the Libre-soc-dev mailing list