[llvm-dev] Lowering SEXT (and ZEXT) efficiently on Z80
Bruce Hoult via llvm-dev
llvm-dev at lists.llvm.org
Wed Jul 18 04:21:59 PDT 2018
On Wed, Jul 18, 2018 at 3:54 AM, Michael Stellmann <
Michael.Stellmann at gmx.net> wrote:
> Thank you very much Bruce!
>
> Very well explained! I'm slowly getting the hang of how lowering is
> supposed to work in LLVM.
>
>
> P.S. The code you posted is expert level, you are sure knowledgeable about
> the Z80! ;-)
>
Ha! I did a little Z80 programming on a Sinclair ZX81 in 1981. I knew 6502
very well, before that.
That shift left then subtract-with-carry trick is exactly the same as you'd
use on 8080, 8085, and 8086/8.
6502 requires different tricks, as the sense of the carry bit is reversed
for subtract.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180718/bdf67eb6/attachment.html>
More information about the llvm-dev
mailing list