From patchwork Wed Nov 23 08:30:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 2094 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2662563wrr; Wed, 23 Nov 2022 00:31:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf5C4tOHNnuM1WPamICRkWPosnAHq3/vUmKXmNCFRabDj0jHqTPGZ+mF3J4CgMNdCfJVcwkM X-Received: by 2002:a17:906:6d7:b0:781:951:2fb with SMTP id v23-20020a17090606d700b00781095102fbmr22788072ejb.64.1669192269796; Wed, 23 Nov 2022 00:31:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669192269; cv=none; d=google.com; s=arc-20160816; b=c7bQ4KW5gJAzUVj9b/qzdiNLEGjUfQMJoCwaaiNgXzvUXt0Yomu6HLsn1uU2+BKp14 Ed8I965HOrLkTnW/VtLf9TT9q+sYWfmQZj/D/HKZgChKeuSULGL/FNqbyg5bbWEunFWf i4l0kyCk22ej7pbSV0Q00Hr7Hcmqx9UN7NogTwnQ2FvyIKJGR+76VUeu+U95257WNniy L+uK81SAyFdWdQ06NdCvK8V5mr1j9J5YytxSezBSs2y+pDa20WIy+AYLvk/8WghYnPxj O1QGI4rP2u6A5OLmgXW5JjWQUIidnj7ZVGF+1KqFvFf2y40+BihdggF0VKQrihH5vC5L UNaA== 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:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=peyOBXtZDAvynPyUxGv4A90GDntEuxyVEkFaJ0xCa34=; b=D6sZlmDEsGjkgMR7nzY+nSzCUdNMBXeLukEi28YoZq7Qlfw4s+PrTLuOJZ3ZCP3ZDL YGFGMR33zJQnvBCCrRZAg5oofJtMVI4OOqsJTM6ACSv9av/xGK7XcYr1/b+NCwnbqctj KHTjx7CL+TVQyE9CeqOiD/QH45NUM9B5gRQzmRw+qzbNxIvubjd0i4WxVl9qIrrwVKNf P6ljvJFAUzLC12ZJyIeOQNHlN/N8QuCaSvFelKmSUVKF+XzJissB+7ZXkkaAf/7m2UWd F7kHQ38JfGimcy54sKkideCh4bqiw/OtXlnFCocXN4ROdLo62SBfg3bb+dAif1ipW3YI Qg1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=lEVLyDpt; 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 sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id sb36-20020a1709076da400b007abafd4d7d0si14164170ejc.702.2022.11.23.00.31.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 00:31:09 -0800 (PST) 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=lEVLyDpt; 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 C02803853D47 for ; Wed, 23 Nov 2022 08:31:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C02803853D47 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669192268; bh=peyOBXtZDAvynPyUxGv4A90GDntEuxyVEkFaJ0xCa34=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=lEVLyDptnheqM9PWJLLWmFCVhw96o1+BOW7sIC27IJ3T/AM3SSKZ5bE6GLPY/ytl/ bC+DwO598cIKlFQABU2FGbJuIVFry0MH/ORUy4W4W8E1V4bH6CYEdfr0CVSL6ndU8n qOLdV0xs9iW9wrjdL35gSfOmdvPLitBjIfZ9J/iY= 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 1F3AA385455F for ; Wed, 23 Nov 2022 08:30:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F3AA385455F Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 71DF5300089; Wed, 23 Nov 2022 08:30:57 +0000 (UTC) To: Tsukasa OI , Jan Beulich , Nelson Chu Cc: binutils@sourceware.org Subject: [PATCH v2 0/2] RISC-V: Better support for long instructions (64 < x <= 176 [bits]) Date: Wed, 23 Nov 2022 08:30:47 +0000 Message-Id: In-Reply-To: References: 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 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749907561374700638?= X-GMAIL-MSGID: =?utf-8?q?1750274953014611159?= Hello, c.f. PATCH v1: [Changes: v1 -> v2] 1. Rebased (as usual) 2. PATCH 2/2: Simplified the logic to extract low instruction bits (will describe later) 3. PATCH 2/2: Changed the commit message slightly As a part of the process making the logic more flexible to bignum internal changes, PATCH v1 used a complex logic. After some investigation, I found the function: generic_bignum_to_int32. I decided to use this on PATCH v2. Despite that it DOES NOT guarantee that it will extract lower 32-bits of a big number even if the number overflows but it does (on the current design) and flexible enough to bignum internal changes (I don't want to make dependencies to something which can be easily changed as long as it is reasonable enough). Just for sure, I added a comment for the assumption of this part. Thanks, Tsukasa Tsukasa OI (2): RISC-V: Make .insn tests stricter RISC-V: Better support for long instructions gas/config/tc-riscv.c | 38 ++++++++++++++++++++++------ gas/testsuite/gas/riscv/insn-dwarf.d | 10 +++++++- gas/testsuite/gas/riscv/insn-na.d | 28 ++++++++++++-------- gas/testsuite/gas/riscv/insn.d | 32 +++++++++++++++++++---- gas/testsuite/gas/riscv/insn.s | 9 +++++++ opcodes/riscv-dis.c | 13 ++++++---- 6 files changed, 101 insertions(+), 29 deletions(-) base-commit: 829b6b3736d972f5fbacda09c82b31802d3b594c