Skip to content
Snippets Groups Projects
Commit 74290c66 authored by Xiao Zeng's avatar Xiao Zeng Committed by Jeff Law
Browse files

[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: default avatarPhilipp Tomsich <philipp.tomsich@vrull.eu>
Co-authored-by: default avatarRaphael Zinsly <rzinsly@ventanamicro.com>
Co-authored-by: default avatarJeff Law <jlaw@ventanamicro.com>
parent aee2817e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment