From patchwork Wed Mar 27 19:54:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 1917038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=QQsjrSIJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4g4v0sCWz1yWr for ; Thu, 28 Mar 2024 08:37:49 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD3A3385E457 for ; Wed, 27 Mar 2024 21:37:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 0ABC83858D34 for ; Wed, 27 Mar 2024 21:37:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0ABC83858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0ABC83858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711575443; cv=none; b=k+KfryN40bI4jqvq8O+43Q1l/RGsw+iNsU3NZEj3JoEB1Mk4a1ml9ti9QOW4QFP5l3rEu+0BWZL0oi009EVqi9vucYZo44TnCJ+8fPROaJ7+r+R170JjCSc7RBRpDu29xNBWGoYBe8QBYU6ifO/IbxNObFv1c8/YgKgj4GgTqYA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711575443; c=relaxed/simple; bh=iGSJZ9HG7PQmk+qEg9jfYDdvcsCwYMBZdVsqxFH6RHI=; h=DKIM-Signature:Subject:Date:Message-ID:MIME-Version:From:To; b=KRtH/PklGiGFIaHKa3qMz3BYQdUvf6rWdZt6TfSoL30G3nn/bkoKP8uZHpeH0dLIhnMPQjBexTZSHh/ZulSG33BoPFAu5aiE0S7ntuT3kRffRA5Jf+H0ZNMV2TiTG7zsM0vB7cB3PMVFUkZLH6nHvwCM4DKBgo3pRwp4oEsylbc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6e6082eab17so327281b3a.1 for ; Wed, 27 Mar 2024 14:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1711575441; x=1712180241; darn=gcc.gnu.org; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=vuqHNfPE4x2MxEYV5hykn10yHQcXKYfPXWBy8EivmYU=; b=QQsjrSIJQZTkXgJUqYQMYSXdXaDALnVBxBEk1Q1X5jSdb7CaDBCHVbl2b2RDpKMVux y/k3SNwex3XZv9vZg8wfpgvN5qCTaspwjao3e+7vF/LZy5jLoMTq01zWEco1gOLF6CvF 6YjGeIWr1M94GTr1OKMd0hInP0QwLPG/fTsMwMKWohyzKvWKGS3edC+VzsVPGxyTBaQb AnXDpocWYLMnum6NZ12rmUy/JJUysWRRCuaxZq4Zl4VAVSb6ifEhXK8px7Ut8/1m8L6o tdhJsoKKHcwuGpAOoX37OfL7f8/XAY6iv9q0aSwi+3a+mG/jr2BX151NWoOtLRK3bo6Q +LNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711575441; x=1712180241; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vuqHNfPE4x2MxEYV5hykn10yHQcXKYfPXWBy8EivmYU=; b=B65w3myH2IzWmSvnMyDvzH8iNwmG02iJ6MZQfNHsetFaO5ceLjWcFg8G4AYQRPx3+9 +zZsyUhTuG6qnwBXPN1fCfBRSAHasoCy0vRWXCBBvQWj/fxIF7AhWCabG5id4Fa9pEWV lDjnXwdHh9zDCqlJOhn+E3rPGMU3qhvWbXgSU7CjPTuFvAmMPuUnjH3PKBJdKxvmbWwQ 3H93H0tOgoESDpok8TurwHuhVuDmuxzhYJoac1GeXaGOp6n4vT4zYFbFzIFSzREOJN9j DwiUYdI8fUvYk2SsQRBLSNDhP3mY6hm1B6P0zsmanmYUTxqMFBdjFp7DnhDKinAqM7H2 DadA== X-Gm-Message-State: AOJu0YxZqyv+GXBSzHSa+VhJx/4yLudCU5sd13x8oZc0IlDIx8mM2/le EtxRCBmHrmMNqQ4j9uY4sJIlKl2VU6v8MPiZPEREZhNOe+Z2Jy6f5vSbBKUxNTs= X-Google-Smtp-Source: AGHT+IGyiQGInjMdciWL6ny4EaP1s1T92PLsZ1FWd4nrTpVQs0pkTRleaBiR1QkPTjlJoHebQvFIjA== X-Received: by 2002:a05:6a20:4c07:b0:1a3:bd98:c4af with SMTP id fm7-20020a056a204c0700b001a3bd98c4afmr811609pzb.48.1711575440741; Wed, 27 Mar 2024 14:37:20 -0700 (PDT) Received: from localhost ([192.184.165.199]) by smtp.gmail.com with ESMTPSA id r7-20020aa79ec7000000b006e65d66bb3csm10492pfq.21.2024.03.27.14.37.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 14:37:19 -0700 (PDT) Subject: [PATCH] RISC-V: Add vxsat as a register Date: Wed, 27 Mar 2024 12:54:04 -0700 Message-ID: <20240327195403.29732-2-palmer@rivosinc.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Cc: Palmer Dabbelt From: Palmer Dabbelt To: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-10.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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org We aren't doing anything with vxsat right now, but I'd like to add it as an accepted register to the clobber list. If we get this into GCC-14 then we'll avoid some preprocessor-based twiddling if we ever start using vxsat in the future. gcc/ChangeLog: * config/riscv/riscv.h (REGISTER_NAMES): Add vxsat. --- IIUC we aren't using these N/A regnos for anything, they're just there to pad out the types. So I think this is safe, but Juzhe would likely know best here. See https://inbox.sourceware.org/libc-alpha/20240327193601.28903-2-palmer@rivosinc.com/ a use of this. --- gcc/config/riscv/riscv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index da089a03e9d..d5779512994 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -933,7 +933,7 @@ extern enum riscv_cc get_riscv_cc (const rtx use); "fs0", "fs1", "fa0", "fa1", "fa2", "fa3", "fa4", "fa5", \ "fa6", "fa7", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7", \ "fs8", "fs9", "fs10","fs11","ft8", "ft9", "ft10","ft11", \ - "arg", "frame", "vl", "vtype", "vxrm", "frm", "N/A", "N/A", \ + "arg", "frame", "vl", "vtype", "vxrm", "frm", "vxsat", "N/A", \ "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", \ "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", \ "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", \