From patchwork Mon Jul 24 05:38:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 12479 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1587727vqg; Sun, 23 Jul 2023 22:39:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFbY0WX3BMA3Rd1IJjE1VSnugK8ZUVPfZrXaqEC8FzHVx+TRlP15rhSV4QCdDvZHBfUXiNu X-Received: by 2002:a17:906:1091:b0:991:c9da:70da with SMTP id u17-20020a170906109100b00991c9da70damr10088979eju.61.1690177170010; Sun, 23 Jul 2023 22:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690177169; cv=none; d=google.com; s=arc-20160816; b=MwmJK2pIMWuNQW2XsCnjPbQ/RFwtZCDgE17yDRLTiq78NRp8rjjEDdxkHnRPf1Vpcv a6tLtkDlD508ySXIdBLQTeHUWBrjXIOdWJKu+zXHgADcNqP3C+uqLjDqn0J+3BfuWVA4 DaxXbqLfdbAzHFvnuOMXiFiBYvPdjov+M6MhcSDachrhH8561tLIUGgwIv3YA2eYzVzo AmRsYiu16yONuJMeHhKyblNTLlZhds3CBS2gLtxP9iJreIS1zczgzQkf2SIAoDBdght7 +NYd4bWk1ZsnakKeQA+ahu5egZ4Zt4FcTxyCyHyLUnxBvVeWLkfHXa81/KkAG8FPAnSc ftFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Ho+V9tSCRfYkJJgod3ManUCDFRIqul/2PjFyYx4giAA=; fh=53cJj9TBSYR/wgWr2Q2wXVHUGiHHr7QV00QtBv5db8E=; b=rgLqjvUzrXbo21a0OYfkK5XFWyoKwXe0i20i7wVgFk7HSWcXylMkA3zkLRXl/RDa9L ZIVtZixbemn2I2llaAGjTrzFt7X0al3IASm7nGuYiRkqM43OnBc1hAXofbrZ3OHneNHO d18W21a+1hsjYl8vvWIq9Ofey0Om2QVdIuWkEvXXlfGxymXi80vcRTTSOpaA7veuMhyx X7HXkWksjhPOA4XcxV4uOL1i0YsZ/eFYZnz5fSq8vmVVIRMfdkJgT0n6fzejQqqjzJZb HuEarlQQHrJOUAnl8R2S/lFQPoQSXzIq+dtluqBV12sQ3peP4dOBFTw8IDbkHlUjtC3p bh9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="UGGf3/ye"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s19-20020a170906169300b0099364d9f0edsi5750636ejd.402.2023.07.23.22.39.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jul 2023 22:39:29 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="UGGf3/ye"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D754F385783F for ; Mon, 24 Jul 2023 05:39:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D754F385783F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1690177168; bh=Ho+V9tSCRfYkJJgod3ManUCDFRIqul/2PjFyYx4giAA=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=UGGf3/yej3svDHi76RUjssdCnGIH2aTyor0ac/ipGM9P+upsP0Y3mrv9jj98fKv12 y/F6O5lLuvinQIao75dmXJiBm6qt7yIpVeIKrmIzw7C6zcHk8z/QetKN1cr4tTa5sS s98nKwh4ZgfXPU63/d9Us9aLCkOU7T/Gti/afZ3w= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id CD8433858C62 for ; Mon, 24 Jul 2023 05:39:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD8433858C62 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id D9398300089; Mon, 24 Jul 2023 05:39:16 +0000 (UTC) To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 0/2] RISC-V: Reflect v1.0.4-1 of the code size reduction spec Date: Mon, 24 Jul 2023 05:38:50 +0000 Message-ID: Mime-Version: 1.0 X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772279216530701187 X-GMAIL-MSGID: 1772279216530701187 Hello again, I am pleased to announce that I can contribute to GNU Binutils again! This is a follow-up patch set for the code size reduction specification by Jiawei et al. (partial support excluding those that conflict with 'Zcd'). This is compliant with the initial ratified version but there is a new version of the specification including minor additions. cf: The version 1.0.4-1 of the specification 1. 'Zcf' is only allowed on RV32 (as no instruction exists on RV64/128). 2. 'Zcf' implies 'F' and 'Zcd' implies D. This patch set makes GNU Binutils compliant with the latest code size reduction specification (a subset where GNU Binutils has already implemented) except a minor issue: 'C' does not imply 'Zca', 'Zcd' and 'Zcf' (only on RV32). Note that this is a consequence from handling of the 'Zmmul' extension (a subset of 'M'). Thanks, Tsukasa Tsukasa OI (2): RISC-V: Prohibit the 'Zcf' extension on RV64 RISC-V: Implications from 'Zc[fd]' extensions bfd/elfxx-riscv.c | 9 +++++++++ gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d | 3 +++ gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l | 2 ++ gas/testsuite/gas/riscv/march-imply-zcd.d | 6 ++++++ gas/testsuite/gas/riscv/march-imply-zcf.d | 6 ++++++ 5 files changed, 26 insertions(+) create mode 100644 gas/testsuite/gas/riscv/march-fail-rv64i_zcf.d create mode 100644 gas/testsuite/gas/riscv/march-fail-rv64i_zcf.l create mode 100644 gas/testsuite/gas/riscv/march-imply-zcd.d create mode 100644 gas/testsuite/gas/riscv/march-imply-zcf.d base-commit: 5cbe549257b0aed1b615714e74bb6a3f066f3253