From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id DBB7A3857C44; Mon, 18 Sep 2023 18:24:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DBB7A3857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695061478; bh=GQV1WKddHqGsQ0D3qwMgi1c80YV6kHLr9FvNu4WMDgc=; h=From:To:Subject:Date:From; b=Y8+/YQ/2E4jHd2FnSA2pv47LIQXPk8637GhMNvGc5RYR8W6bo34MzjGeBxgh22Tc1 /QVnhlQ6G6mqU87g0Xbu2HoFxN5x5oicgivB/OuUm63LAaLobygSqGr4wP3+XOyf6f cSR62zzfFc0CtWrPSIUFrbyHqdTC9/SFGw2bm3zM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Add Types to Un-Typed Thead Instructions X-Act-Checkin: gcc X-Git-Author: Edwin Lu X-Git-Refname: refs/vendors/riscv/heads/gcc-13-with-riscv-opts X-Git-Oldrev: 1bba87996278a70c700da6dc72534f52d5a087fa X-Git-Newrev: 7ac52d2caddf75bce64d3880ea23c55ecaf93dd8 Message-Id: <20230918182438.DBB7A3857C44@sourceware.org> Date: Mon, 18 Sep 2023 18:24:38 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7ac52d2caddf75bce64d3880ea23c55ecaf93dd8 commit 7ac52d2caddf75bce64d3880ea23c55ecaf93dd8 Author: Edwin Lu Date: Mon Sep 11 10:00:34 2023 -0700 RISC-V: Add Types to Un-Typed Thead Instructions Updates the THEAD instructions to ensure that no insn is left without a type attribute. Tested for regressions using rv32/64 multilib for linux/newlib. gcc/Changelog: * config/riscv/thead.md: Update types Signed-off-by: Edwin Lu (cherry picked from commit 316d57da5bb9205b946afc56d78582fee874e4b5) Diff: --- gcc/config/riscv/thead.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/riscv/thead.md b/gcc/config/riscv/thead.md index 2287b752ea1..65dbd32536f 100644 --- a/gcc/config/riscv/thead.md +++ b/gcc/config/riscv/thead.md @@ -180,6 +180,7 @@ "!TARGET_64BIT && TARGET_XTHEADFMV" "fmv.w.x\t%0,%2\n\tth.fmv.hw.x\t%0,%1" [(set_attr "move_type" "move") + (set_attr "type" "fmove") (set_attr "mode" "DF")]) (define_insn "th_fmv_x_w" @@ -189,6 +190,7 @@ "!TARGET_64BIT && TARGET_XTHEADFMV" "fmv.x.w\t%0,%1" [(set_attr "move_type" "move") + (set_attr "type" "fmove") (set_attr "mode" "DF")]) (define_insn "th_fmv_x_hw" @@ -198,6 +200,7 @@ "!TARGET_64BIT && TARGET_XTHEADFMV" "th.fmv.x.hw\t%0,%1" [(set_attr "move_type" "move") + (set_attr "type" "fmove") (set_attr "mode" "DF")]) ;; XTheadMac @@ -333,6 +336,7 @@ && th_mempair_operands_p (operands, true, mode)" { return th_mempair_output_move (operands, true, mode, UNKNOWN); } [(set_attr "move_type" "load") + (set_attr "type" "load") (set_attr "mode" "")]) ;; MEMPAIR store 64/32 bit @@ -345,6 +349,7 @@ && th_mempair_operands_p (operands, false, mode)" { return th_mempair_output_move (operands, false, mode, UNKNOWN); } [(set_attr "move_type" "store") + (set_attr "type" "store") (set_attr "mode" "")]) ;; MEMPAIR load DI extended signed SI @@ -357,6 +362,7 @@ && th_mempair_operands_p (operands, true, SImode)" { return th_mempair_output_move (operands, true, SImode, SIGN_EXTEND); } [(set_attr "move_type" "load") + (set_attr "type" "load") (set_attr "mode" "DI") (set_attr "length" "8")]) @@ -370,6 +376,7 @@ && th_mempair_operands_p (operands, true, SImode)" { return th_mempair_output_move (operands, true, SImode, ZERO_EXTEND); } [(set_attr "move_type" "load") + (set_attr "type" "load") (set_attr "mode" "DI") (set_attr "length" "8")])