[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lightning] RFC: conditional move
From: |
Paul Cercueil |
Subject: |
[Lightning] RFC: conditional move |
Date: |
Mon, 07 Oct 2019 11:58:19 +0200 |
Hi,
I was thinking that we could have a conditional move operation,
something like:
movs 01 = (04 != 0) ? 02 : 03
movc 01 = (04 == 0) ? 02 : 03
(of course 'movc' is just a 'movs' with inverted 02/03 operands, so
there could be only one operation)
That would be easy to implement on MIPS with MOVZ/MOVN, ARM with
TST/MOVS, AArch64 with TST/CSEL. The other platforms could resolve to
emitting branches.
That's something that would be very useful to me.
Thoughts?
Thanks,
-Paul
- [Lightning] RFC: conditional move,
Paul Cercueil <=