]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/riscv/riscv.md
RISC-V: Generate helpers for cbranch4.
authorChristoph Muellner <cmuellner@gcc.gnu.org>
Wed, 5 May 2021 19:23:41 +0000 (21:23 +0200)
committerJim Wilson <jimw@sifive.com>
Thu, 6 May 2021 01:15:42 +0000 (18:15 -0700)
commite1fcf14f33e4f371aae8ae497ca58a760d53ca6d
tree60f7b28fbcbdb2fe4b8582e029db5e2cb4f717cf
parent449480114aa5ee7e400b75c654f548e38fd03a64
RISC-V: Generate helpers for cbranch4.

On RISC-V we are facing the fact, that our conditional branches
require Pmode conditions. Currently, we generate them explicitly
with a check for Pmode and then calling the proper generator
(i.e. gen_cbranchdi4 on RV64 and gen_cbranchsi4 on RV32).
Let's simplify this code by generating the INSN helpers
and use gen_cbranch4 (Pmode).

gcc/
PR target/100266
* config/riscv/riscv.c (riscv_block_move_loop): Use cbranch helper.
* config/riscv/riscv.md (cbranch<mode>4): Generate helpers.
(stack_protect_test): Use cbranch helper.
gcc/config/riscv/riscv.c
gcc/config/riscv/riscv.md