aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.cc
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2023-09-05 22:00:00 +0200
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>2023-09-05 23:58:31 +0200
commit102dd3e8067f12beee1b8b0bec6848733d107aee (patch)
tree426c8d77879b2093fa614343b2f37ea27dacb50c /gcc/c/c-decl.cc
parentfbc01748ba46eb26074388a8fb7b44d25a414a72 (diff)
downloadgcc-102dd3e8067f12beee1b8b0bec6848733d107aee.zip
gcc-102dd3e8067f12beee1b8b0bec6848733d107aee.tar.gz
gcc-102dd3e8067f12beee1b8b0bec6848733d107aee.tar.bz2
riscv: Synthesize all 11-bit-rotate constants with rori
Some constants can be built up using LI+RORI instructions. The current implementation requires one of the upper 32-bits to be a zero bit, which is not neccesary. Let's drop this requirement in order to be able to synthesize a constant like 0xffffffff00ffffffL. The tests for LI+RORI are made more strict to detect regression in the calculation of the LI constant and the rotation amount. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> gcc/ChangeLog: * config/riscv/riscv.cc (riscv_build_integer_1): Don't require one zero bit in the upper 32 bits for LI+RORI synthesis. gcc/testsuite/ChangeLog: * gcc.target/riscv/xtheadbb-li-rotr.c: New tests. * gcc.target/riscv/zbb-li-rotr.c: Likewise.
Diffstat (limited to 'gcc/c/c-decl.cc')
0 files changed, 0 insertions, 0 deletions