[Libre-soc-dev] change sv ld/st to allow non-zero immediates for unit-strided load/store

Jacob Lifshay programmerjake at gmail.com
Tue Oct 11 21:47:35 BST 2022


On Tue, Oct 11, 2022, 02:51 lkcl <luke.leighton at gmail.com> wrote:

> On Tue, Oct 11, 2022 at 10:28 AM Jacob Lifshay <programmerjake at gmail.com>
> wrote:
> >
> > this will be very common in spill code or other code with vectors stored
> in a struct or on stack:
> > sv.ld/unitstrided *r120, -32(r1) # load from local stack var in redzone
> > sv.ld/unitstrided *r32, 64(r1) # load from function arguments
> > sv.ld/unitstrided *r64, 32(r3) # load from struct member that starts at
> offset 32
>

to be clear, I'm *not* proposing post-increment (which is what your reply
seem to be entirely about), i'm proposing unit-strided, no-update, with
non-zero immediates, e.g.:

sv.ld/unitstrided *r32, 64(r1)

equivalent code:
for i in range(VL):
    ea = 64 + regs[1]
    regs[i + 32] = mem(ea)

Jacob


More information about the Libre-soc-dev mailing list