[PATCH V1 0/1] UNRATIFIED RISC-V:Add 'ZiCond' extension

shiyulong@iscas.ac.cn shiyulong@iscas.ac.cn
Thu Feb 9 11:06:16 GMT 2023


From: yulong <shiyulong@iscas.ac.cn>

*** WAIT FOR SPECIFICATION FREEZE ***
This is an implementation for unratified and not frozen RISC-V extension
and not intended to be merged for now.
The intent to submit this patchset is to synchronize with the implementation
of binutils about the ZiCond extension.

This patchset adds following unratified extension to GNU gcc:

- 'ZiCond'(Integer Conditional Operations) version 1.0 development which
adds 2 instructions ('czero.eqz' and 'czero.nez').

This extension makes conditional arithmetic feature much simpler (fewer
instructions when no branches are allowed).  Note that constant timing
guarantee (data-independence / certain side-channel resistance) for this
extension is being discussed and may not be guaranteed.


This is based on the commit 394e24376939 of the specification document:
<https://github.com/riscv/riscv-zicondops>

*** BLURB HERE ***

yulong (1):
  UNRATIFIED RISC-V: Add 'ZiCond' extension

 gcc/common/config/riscv/riscv-common.cc   |  4 ++++
 gcc/config/riscv/riscv-builtins.cc        |  8 ++++++++
 gcc/config/riscv/riscv-ftypes.def         |  2 ++
 gcc/config/riscv/riscv-opts.h             |  3 +++
 gcc/config/riscv/riscv-zicond.def         |  5 +++++
 gcc/config/riscv/riscv.md                 | 22 ++++++++++++++++++++++
 gcc/config/riscv/riscv.opt                |  3 +++
 gcc/testsuite/gcc.target/riscv/zicond-1.c | 15 +++++++++++++++
 gcc/testsuite/gcc.target/riscv/zicond-2.c | 15 +++++++++++++++
 9 files changed, 77 insertions(+)
 create mode 100644 gcc/config/riscv/riscv-zicond.def
 create mode 100644 gcc/testsuite/gcc.target/riscv/zicond-1.c
 create mode 100644 gcc/testsuite/gcc.target/riscv/zicond-2.c

-- 
2.25.1



More information about the Gcc-patches mailing list