d: Implement core.bitop.rol() and core.bitop.ror() as intrinsics.
authorIain Buclaw <ibuclaw@gdcproject.org>
Wed, 15 Jul 2020 21:00:11 +0000 (23:00 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Thu, 30 Jul 2020 10:03:58 +0000 (12:03 +0200)
commit7d4ee8bc5843997cdc4408848ab2d9ec82f085b2
treec09107f7a7bd6e186cfa6ffbccc6b00f468bf714
parent6ee874f1353933b1427b5e2953358eb3424090d5
d: Implement core.bitop.rol() and core.bitop.ror() as intrinsics.

gcc/d/ChangeLog:

* intrinsics.cc (expand_intrinsic_rotate): Add function.
(maybe_expand_intrinsic): Handle rol and ror intrinsics.
* intrinsics.def (ROL): Add intrinsic.
(ROL_TIARG): Add intrinsic.
(ROR): Add intrinsic.
(ROR_TIARG): Add intrinsic.

gcc/testsuite/ChangeLog:

* gdc.dg/intrinsics.d: Add ror and rol tests.
gcc/d/intrinsics.cc
gcc/d/intrinsics.def
gcc/testsuite/gdc.dg/intrinsics.d