From d137723be6b9bb0f7c0e69aea0c6735ad092f366 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Mon, 3 Feb 2020 03:15:01 +0100 Subject: [PATCH] cris: Enable 32-bit shifts, clz, bswap, umin to set condition codes. Enables dropping of compares with zero of the result, through any CCmode substitution. gcc: * config/cris/cris.md ("si3"): Rename from "si3". ("clzsi2"): Rename from "clzsi2". ("bswapsi2"): Rename from "bswapsi2". ("*uminsi3"): Rename from "*uminsi3". --- gcc/ChangeLog | 7 +++++++ gcc/config/cris/cris.md | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54073e2749d..9aca1c3310e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -145,6 +145,13 @@ from "xorsi3". ("one_cmplsi2"): Rename from "one_cmplsi2". + ("si3"): Rename + from "si3". + ("clzsi2"): Rename + from "clzsi2". + ("bswapsi2"): Rename + from "bswapsi2". + ("*uminsi3"): Rename from "*uminsi3". 2020-05-08 Vladimir Makarov diff --git a/gcc/config/cris/cris.md b/gcc/config/cris/cris.md index 6faef6cda02..c085e26602e 100644 --- a/gcc/config/cris/cris.md +++ b/gcc/config/cris/cris.md @@ -1758,7 +1758,7 @@ ;; Arithmetic/Logical shift right (and SI left). -(define_insn "si3" +(define_insn "si3" [(set (match_operand:SI 0 "register_operand" "=r") (shift:SI (match_operand:SI 1 "register_operand" "0") (match_operand:SI 2 "nonmemory_operand" "Kcr"))) @@ -1918,7 +1918,7 @@ "" "operands[2] = gen_reg_rtx (SImode); operands[3] = gen_reg_rtx (SImode);") -(define_insn "clzsi2" +(define_insn "clzsi2" [(set (match_operand:SI 0 "register_operand" "=r") (clz:SI (match_operand:SI 1 "register_operand" "r"))) (clobber (reg:CC CRIS_CC0_REGNUM))] @@ -1926,7 +1926,7 @@ "lz %1,%0" [(set_attr "slottable" "yes")]) -(define_insn "bswapsi2" +(define_insn "bswapsi2" [(set (match_operand:SI 0 "register_operand" "=r") (bswap:SI (match_operand:SI 1 "register_operand" "0"))) (clobber (reg:CC CRIS_CC0_REGNUM))] @@ -1979,7 +1979,7 @@ "" "") -(define_insn "*uminsi3" +(define_insn "*uminsi3" [(set (match_operand:SI 0 "register_operand" "=r,r, r,r") (umin:SI (match_operand:SI 1 "register_operand" "%0,0, 0,r") (match_operand:SI 2 "general_operand" "r,Q>,g,!To"))) -- 2.30.2