lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unaligned load/store opcodes


From: Paulo César Pereira de Andrade
Subject: Re: Unaligned load/store opcodes
Date: Thu, 23 Mar 2023 13:50:22 -0300

Em qui., 23 de mar. de 2023 às 08:07, Paul Cercueil
<paul@crapouillou.net> escreveu:
>
> Hi Paulo,

  Hi Paul,

> I think Lightning would benefit from having support for 16/32/64-bit
> I/O to unaligned addresses. That's something I would actually use.
>
> Something like:
> ldur_s / ldur_us / ldur_i / ldur_ui / ldur_l
> stur_s / stur_i / stur_l

  These can be added and fallbacks are mostly trivial.

> I don't think we need ldx/stx variants.

  For completeness, and unless there is an specialized version for
ldx/stx a simple wrapper adding register values is easy.

> What do you think?

  Most cpus have some kind of help for unaligned read, or just
transparently allow it, but slower load/store.

  I will add it to my TODO for the next release.

  I will not work on it right now as I am in the first steps of
qlshr, qlshi, qlshr_u, qlshi_u, qrshr, qrshi, qrshr_u and qrshi_u.
And need some time to check what can be optimized, and not
use a simple, but somewhat expensive fallback.

> Cheers,
> -Paul

Thanks,
Paulo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]