]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH 2/5] [RISC-V] Generate Zicond instruction for basic semantics
authorXiao Zeng <zengxiao@eswincomputing.com>
Wed, 26 Jul 2023 17:59:59 +0000 (11:59 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Wed, 26 Jul 2023 21:12:18 +0000 (15:12 -0600)
commit74290c664d1d4c067a996253fe505555ec671668
treee1501a36fb5cca8ee6bd67cb0582f7d809c43522
parentaee2817ecd261ac2fd2717a2a36db81906ff2346
[PATCH 2/5] [RISC-V] Generate Zicond instruction for basic semantics

This patch completes the recognition of the basic semantics
defined in the spec, namely:

Conditional zero, if condition is equal to zero
  rd = (rs2 == 0) ? 0 : rs1
Conditional zero, if condition is non zero
  rd = (rs2 != 0) ? 0 : rs1

gcc/ChangeLog:

* config/riscv/riscv.md: Include zicond.md
* config/riscv/zicond.md: New file.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/zicond-primitiveSemantics.c: New test.

Co-authored-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Co-authored-by: Raphael Zinsly <rzinsly@ventanamicro.com>
Co-authored-by: Jeff Law <jlaw@ventanamicro.com>
gcc/config/riscv/riscv.md
gcc/config/riscv/zicond.md [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/zicond-primitiveSemantics.c [new file with mode: 0644]