From patchwork Fri May 6 10:34:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takayuki 'January June' Suwa X-Patchwork-Id: 53548 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2AB52394D834 for ; Fri, 6 May 2022 10:37:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AB52394D834 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1651833426; bh=39r255mRUJgxH33igIqBaseT3vTqTJRstyAju3ZmXsk=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Ju37g0N1uK7JRqWWNQdbAX4yzPvoU+Jhau36+kPbQ+/Pr6XTzjN/RgRVzQODPNive 0Byd3fqlArH8S0sxKiSedJvJOjEI56KmdlYfPDCIVnFCxNhKydms6/FAi1FKnHpoN+ 7N0hUuCQsA2KcaIU3XlVrgxgE8ZYmg39yDHe8U7g= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from nh605-vm0.bullet.mail.ssk.yahoo.co.jp (nh605-vm0.bullet.mail.ssk.yahoo.co.jp [182.22.90.73]) by sourceware.org (Postfix) with SMTP id 71523394B02F for ; Fri, 6 May 2022 10:35:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 71523394B02F Received: from [182.22.66.104] by nh605.bullet.mail.ssk.yahoo.co.jp with NNFMP; 06 May 2022 10:35:33 -0000 Received: from [182.22.91.204] by t602.bullet.mail.ssk.yahoo.co.jp with NNFMP; 06 May 2022 10:35:33 -0000 Received: from [127.0.0.1] by omp607.mail.ssk.yahoo.co.jp with NNFMP; 06 May 2022 10:35:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 601613.72619.bm@omp607.mail.ssk.yahoo.co.jp Received: (qmail 16013 invoked by alias); 6 May 2022 10:35:33 -0000 Received: from unknown (HELO ?192.168.2.3?) (175.177.45.171 with ) by smtp6006.mail.ssk.ynwp.yahoo.co.jp with SMTP; 6 May 2022 10:35:33 -0000 X-YMail-JAS: tehqF2MVM1m_B8h4tmPJNP31wX4oGyvqWHNwC8CYQPfTHAjpMci8XM3im2AW1ftLeXrthca5RI4ny6PGlT.Do7M4ywvmEXUkFqDM6zT6TGFNRquVRUjoEs.4Ks2EidX1MyWJ6VNKzA-- X-Apparently-From: X-YMail-OSG: EnOAeVoVM1lD1gGWrFqb.i3bPugLjzM9_QiElcrDYzWepyK SYpWh8uidgakmBuzc2DV5mssdE30mCJcO10bGMDdONmm1RUbHoIJouhiJGX6 PtfsJbYZSLKNN1YXpcONFhpLMw4bE1PoaBOg5ZMGgm3BR60J16pOf2dvxpVY TUOadSkClZgQfqRs.Boq.loCAavKOJzQ42Dd62pw3t30ikNuaU8aLAdaq4qr KO6cjbyX7TRqKwUf4n6sphAvaeH3vTQ3H5iWFh4MVYXDPgCm.Ci0hZaVd39T c82wsteVtNtExnYtuBMme.efCBjp2mnFE8YCfS.zShly5LC.xcJiqUrqO8lZ nDdMyyqKo0iBrwfSalLBNnYbLuGWoPQ5nQ6_vu039g9mlJErBEqip7NEHcL6 gTs8lCtdGLIaScXaljw.hGMEPZaUSjxiTjeEBZpX4qrfQBYDkDfmSfF4IbSV DWg_2QQ1HetbS4qw81OGWqVzfKtKHZ04sD3YXomOzwjswnPYGY.j4QnfFfyh 2zFknIEtjc_URuRZkSx75WXq.TOz_pKqMAnoUnZlOxZ2qupzs26bW1uFdM2y O7UhADbUm.bYPUAxNHVOUoxUO3c1zvULFYMcNiVocAazgzmcBDI.ta0DxVSr rlmSf01u0IkunQrXtO2IaHHbLwkYDqJnbJhAs_PBjpxLHRrtZsGVVcxvNTa3 UXRoRsk.3WmBLfrM8OIEcK5yVE_Jm8J.Q8Ken8TzyQK1AHZqbPROJALO0wTg Yv2mpszdf.eabfOhN7bvIMuJQUrN6h8eq3vZztONHK8Y2Gmy0RoN6uVB1AHI tWT7VTbHCLSs8Nto26LzXiz9u9DVvLjI_GsuWTFSI1VQbqLu7xre5ff5bke9 RUZLGqh0hk1qMlGCrB7KAM0t.ILx8wuxoQP7lRq6XKoPn09qzK4vwqSZkzr0 6T3TkeA1tGq.UpVj. Message-ID: Date: Fri, 6 May 2022 19:34:06 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] xtensa: Rename deprecated extv/extzv insn patterns to extvsi/extzvsi X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Takayuki 'January June' Suwa via Gcc-patches From: Takayuki 'January June' Suwa Reply-To: Takayuki 'January June' Suwa Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" These patterns were deprecated since GCC 4.8. gcc/ChangeLog: * config/xtensa/xtensa.md (extvsi, extvsi_internal, extzvsi, extzvsi_internal): Rename from extv, extv_internal, extzv and extzv_internal, respectively. --- gcc/config/xtensa/xtensa.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md index 3b61e5d4097..96e043b26b5 100644 --- a/gcc/config/xtensa/xtensa.md +++ b/gcc/config/xtensa/xtensa.md @@ -631,7 +631,7 @@ ;; Field extract instructions. -(define_expand "extv" +(define_expand "extvsi" [(set (match_operand:SI 0 "register_operand" "") (sign_extract:SI (match_operand:SI 1 "register_operand" "") (match_operand:SI 2 "const_int_operand" "") @@ -646,12 +646,12 @@ if (!lsbitnum_operand (operands[3], SImode)) FAIL; - emit_insn (gen_extv_internal (operands[0], operands[1], - operands[2], operands[3])); + emit_insn (gen_extvsi_internal (operands[0], operands[1], + operands[2], operands[3])); DONE; }) -(define_insn "extv_internal" +(define_insn "extvsi_internal" [(set (match_operand:SI 0 "register_operand" "=a") (sign_extract:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "sext_fldsz_operand" "i") @@ -666,7 +666,7 @@ (set_attr "mode" "SI") (set_attr "length" "3")]) -(define_expand "extzv" +(define_expand "extzvsi" [(set (match_operand:SI 0 "register_operand" "") (zero_extract:SI (match_operand:SI 1 "register_operand" "") (match_operand:SI 2 "const_int_operand" "") @@ -675,12 +675,12 @@ { if (!extui_fldsz_operand (operands[2], SImode)) FAIL; - emit_insn (gen_extzv_internal (operands[0], operands[1], - operands[2], operands[3])); + emit_insn (gen_extzvsi_internal (operands[0], operands[1], + operands[2], operands[3])); DONE; }) -(define_insn "extzv_internal" +(define_insn "extzvsi_internal" [(set (match_operand:SI 0 "register_operand" "=a") (zero_extract:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "extui_fldsz_operand" "i") From patchwork Fri May 6 10:34:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takayuki 'January June' Suwa X-Patchwork-Id: 53547 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC269394D883 for ; Fri, 6 May 2022 10:36:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC269394D883 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1651833368; bh=yf8WinMseNHYCqCeYMS8XCuyNNuYU/1ifDRxOlKuSgU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Hx7cwVw4cqbJrA8fphx5b5XgNNsGqAoP2moNmbbBQcgk4+rW+V/ydC+yXrrzmy99T BFof98diV+cZP8j2OPZ5rqe/tUs53soCrdP3Ybvv83tZa6rqLbBWgdUHW7+z2WSkZ4 wssybbJbo8DfX5CurQjTR+b13GveSsbzOCMkxU6c= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from nh601-vm12.bullet.mail.ssk.yahoo.co.jp (nh601-vm12.bullet.mail.ssk.yahoo.co.jp [182.22.90.21]) by sourceware.org (Postfix) with SMTP id 61375394B031 for ; Fri, 6 May 2022 10:35:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 61375394B031 Received: from [182.22.66.106] by nh601.bullet.mail.ssk.yahoo.co.jp with NNFMP; 06 May 2022 10:35:34 -0000 Received: from [182.22.91.206] by t604.bullet.mail.ssk.yahoo.co.jp with NNFMP; 06 May 2022 10:35:34 -0000 Received: from [127.0.0.1] by omp609.mail.ssk.yahoo.co.jp with NNFMP; 06 May 2022 10:35:34 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 688000.40439.bm@omp609.mail.ssk.yahoo.co.jp Received: (qmail 44589 invoked by alias); 6 May 2022 10:35:34 -0000 Received: from unknown (HELO ?192.168.2.3?) (175.177.45.171 with ) by smtp6010.mail.ssk.ynwp.yahoo.co.jp with SMTP; 6 May 2022 10:35:34 -0000 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_ZtCIhhgApeERf8yg3IbZPDbhPEebMVSoWk8kfhDs S5kANx02_0E3klKs- Message-ID: <5f99c6da-aa0c-5384-ee48-3556a03a6bf0@yahoo.co.jp> Date: Fri, 6 May 2022 19:34:19 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] xtensa: Reflect the 32-bit Integer Divide Option X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Takayuki 'January June' Suwa via Gcc-patches From: Takayuki 'January June' Suwa Reply-To: Takayuki 'January June' Suwa Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" On Espressif's ESP8266 (based on Tensilica LX106, no hardware divider), this patch reduces the size of each: __moddi3() @ libgcc.a : 969 -> 301 (saves 668) __divmoddi4() : 1111 -> 426 (saves 685) __udivmoddi4() : 1043 -> 319 (saves 724) in bytes, respectively. gcc/ChangeLog: * config/xtensa/xtensa.h (TARGET_HAS_NO_HW_DIVIDE): New macro definition. --- gcc/config/xtensa/xtensa.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index 00e2930b30a..d25594f0c1f 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -75,6 +75,11 @@ along with GCC; see the file COPYING3. If not see #define HAVE_AS_TLS 0 #endif +/* Define this if the target has no hardware divide instructions. */ +#if !TARGET_DIV32 +#define TARGET_HAS_NO_HW_DIVIDE +#endif + /* Target CPU builtins. */ #define TARGET_CPU_CPP_BUILTINS() \