From patchwork Mon Jul 12 04:29:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kito Cheng X-Patchwork-Id: 1503764 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sifive.com header.i=@sifive.com header.a=rsa-sha256 header.s=google header.b=ncLpLOsU; dkim-atps=neutral Received: from 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GNW5F0Yyyz9sRN for ; Mon, 12 Jul 2021 14:29:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DEC463839C54 for ; Mon, 12 Jul 2021 04:29:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id B56623857815 for ; Mon, 12 Jul 2021 04:29:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B56623857815 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pj1-x102a.google.com with SMTP id i16-20020a17090acf90b02901736d9d2218so4792340pju.1 for ; Sun, 11 Jul 2021 21:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AobD9dsgomuixEi5Y4IzMUEQKooHCtGwodf3cXk6LCo=; b=ncLpLOsUdQjjrSyHDuWJKBpYVV10cWdR9l60yTZWyYCcjZt2c2mjKrMV+IV5pJe4ph IK9QM7/t3h44x+5XNygHZ+9838KbuD8cmixvbd0qnDO7uxrnNF2FzYqoG4rrsr5cdJx1 xM2sk4o9I7VlVAfP7NEjDReuW8q9EtqsSmaj5wWjSXwTZwP6TkLFbWxDxobmztoPF41F TKyRiNEB4BxraCevviKCY8rj+5I2kbPPiy+QVnWmHBcuJfM9mUP3a0OJTR1pvstyUXIV btUDBHBRiLJdsUAIRXho1oW99HLKzO859WZcroO8cwCsoBP6wQZgfD3ONX0w1Bjszjo7 9FYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=AobD9dsgomuixEi5Y4IzMUEQKooHCtGwodf3cXk6LCo=; b=aRTuCdRpP8FZ7K4Y7WBgKrHM+tknOPC8atoVc7m3hg4hyo6XSlsZj+nuJA3FdZ7IS8 IR+8hgX0Bca0f0gRzIEGLwhYePVJGSMtTSvYPNbNbxoX+8QbuWZPTAc//3VsebkFa8m2 +IKtllaj2g8RjuIPVkPG8z65mmCHUe0ETBjkvmEunjVPrcfvUe3lFZr3Xkx6Ts7hc3I+ QXzaEyLR0wQIIlo5t/tv/l3M9Roaa8p0cHF0KbyHw3IgMZHNnjfni4jd/jKiO8wn1i8x u9nHC+VEzThT6lKAX10pkXkYWbVCA7EBpZdAhIie9TFyMhJ+b2BmgG+TZITOw+Bi1JN/ ghlg== X-Gm-Message-State: AOAM531ypwHCKuXxWS9UMXxDpdoN2hfAP3vmrQCwf4IwQHFhOlA4MmCT xL3aF4ZBcBVrVmXOb5DGPPMOG2mVY+88ow== X-Google-Smtp-Source: ABdhPJw7P+CdLZYB4qvKBBBVg5z4yzMJanxMUvnD/oO+Z3PtIPnja5aMub0bO/eFcys/+10Lq09S4w== X-Received: by 2002:a17:90b:1e02:: with SMTP id pg2mr12180719pjb.189.1626064160445; Sun, 11 Jul 2021 21:29:20 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (59-124-168-89.HINET-IP.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id fv8sm12167059pjb.21.2021.07.11.21.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jul 2021 21:29:19 -0700 (PDT) From: Kito Cheng To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com, i@maskray.me, palmer@dabbelt.com Subject: [PATCH v2] docs: Add 'S' to Machine Constraints for RISC-V Date: Mon, 12 Jul 2021 12:29:13 +0800 Message-Id: <20210712042913.93981-1-kito.cheng@sifive.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Cc: Kito Cheng Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" It was undocument before, but it might used in linux kernel for resolve code model issue, so LLVM community suggest we should document that, so that make it become supported/documented/non-internal machine constraints. gcc/ChangeLog: PR target/101275 * config/riscv/constraints.md ("S"): Update description and remove @internal. * doc/md.texi (Machine Constraints): Document the 'S' constraints for RISC-V. Reviewed-by: Palmer Dabbelt --- gcc/config/riscv/constraints.md | 3 +-- gcc/doc/md.texi | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/constraints.md b/gcc/config/riscv/constraints.md index 8c15c6c0486..c87d5b796a5 100644 --- a/gcc/config/riscv/constraints.md +++ b/gcc/config/riscv/constraints.md @@ -67,8 +67,7 @@ (define_memory_constraint "A" (match_test "GET_CODE(XEXP(op,0)) == REG"))) (define_constraint "S" - "@internal - A constant call address." + "A constraint that matches an absolute symbolic address." (match_operand 0 "absolute_symbolic_operand")) (define_constraint "U" diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 00caf3844cc..2d120da96cf 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -3536,6 +3536,9 @@ A 5-bit unsigned immediate for CSR access instructions. @item A An address that is held in a general-purpose register. +@item S +A constraint that matches an absolute symbolic address. + @end table @item RX---@file{config/rx/constraints.md}