From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 0C70F3858D28 for ; Thu, 31 Aug 2023 17:36:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C70F3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-68a3082c771so722491b3a.0 for ; Thu, 31 Aug 2023 10:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1693503410; x=1694108210; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VCuYFweC/ZxDXqt2bPyMYn1hc2oxjZA6s+lXZ+mAcLw=; b=tS7GH9wseXBpjIamm79iYGKKeiLff0zrVUSw107PSTfuoHF2LCq87KpYbaV1tonjQH 2Vxkc50GPCyR6zKs4A26LGK7+HhVQ7APvcGlG4yNTVbRG3JVqOMN5fj9RqbZsW3cPcrP SgyU/qZTGm+tLwZJO2qhgcBl8+QIXc82rBRmwTh4e3WIfFJG5jGYFqrVEMfPZgwbSCpv SwRggPyysC5r2/GR26m3AOl7iQmfbOdowUA/+oyuvh/yLmzMt5xxHaRmO5+vxeh1hhp+ VsF+D6wFfOM5ff3S8x0KuXfxTC8iAAzCoIrfa37VnFlxSpYmDRFkA2wk4dwtlh6wdk37 AahQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693503410; x=1694108210; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VCuYFweC/ZxDXqt2bPyMYn1hc2oxjZA6s+lXZ+mAcLw=; b=ZmhzaFeXhrafmaCS/zMI+MYi4/gGPWMLsAvrA5EEfzCflTiEa5jPpK5ES6d0a/JL33 OuR9H2KcqSu+H0DGQK9KM7qwwkyyt4JcRY9/VqW1DZr0TdmXdvP/ji97Vf1ese6FL5GY dbk19hEO6p+nq2y1LXO83s4oDJfovdFK4m2DxXM4afRj+7CUMjtQrtrQtefGO4a8Ef1U D3uFOaUIipeAeVEVltIbe+ZiBPMsGwwjMiptvxzpHj9Zprj4GqzExOzWXyKEt/g7oc3+ P8rCbiR/+VUnmXvE7sh0QVVqb3j/1fp1aPiUTbn40JN3MJ2IM64YBwBmMrLn8DxEs25b xarQ== X-Gm-Message-State: AOJu0YzwYeYRUPk0WuOZHsqjtR2cnlxfidwXomDEWnDw7CpyvmfmVwtb tK/TSHXsk8xBaFhbREp+zy7HqpciFUi/G/QHeBw= X-Google-Smtp-Source: AGHT+IEdRpTj5xbIjBEzhRTP6H85C5wUrzXoF0afJyiKbnKW8br2kJSwzg5NbQI9dCXZCf21wz8dLQ== X-Received: by 2002:a05:6a00:2d97:b0:68a:4163:66f with SMTP id fb23-20020a056a002d9700b0068a4163066fmr524507pfb.9.1693503410019; Thu, 31 Aug 2023 10:36:50 -0700 (PDT) Received: from ewlu.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id f4-20020aa782c4000000b0068be7119e55sm1559020pfn.122.2023.08.31.10.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Aug 2023 10:36:49 -0700 (PDT) From: Edwin Lu To: gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com, Edwin Lu Subject: [PATCH] RISC-V Add Types to Un-Typed Thead Instructions: Date: Thu, 31 Aug 2023 10:36:26 -0700 Message-ID: <20230831173637.583424-1-ewlu@rivosinc.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5eb2@gmail.com/ This patch 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 --- 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 29f98dec3a8..6e63cb946e4 100644 --- a/gcc/config/riscv/thead.md +++ b/gcc/config/riscv/thead.md @@ -169,6 +169,7 @@ (define_insn "th_fmv_hw_w_x" "!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" @@ -178,6 +179,7 @@ (define_insn "th_fmv_x_w" "!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" @@ -187,6 +189,7 @@ (define_insn "th_fmv_x_hw" "!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 @@ -322,6 +325,7 @@ (define_insn "*th_mempair_load_2" && 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 @@ -334,6 +338,7 @@ (define_insn "*th_mempair_store_2" && 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 @@ -346,6 +351,7 @@ (define_insn "*th_mempair_load_extendsidi2" && 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")]) @@ -359,6 +365,7 @@ (define_insn "*th_mempair_load_zero_extendsidi2" && 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")]) -- 2.34.1