From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by sourceware.org (Postfix) with ESMTPS id A2FC03857422 for ; Fri, 2 Jul 2021 03:15:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A2FC03857422 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f179.google.com with SMTP id o4so1794677plg.1 for ; Thu, 01 Jul 2021 20:15:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ir7Ubme4QtjWr15jE9KBFe/wzTYfCxqACZIPSsuA/Ts=; b=ic4jJtE/33PgWWjoimbIO026Pe33N867LSQeW0cA0q+8NX32hSIPc33e00cZmDk/tx /atwRFOutG610JbwfSOX7GHTZynNDis1bI4RCiyAG1pGOAfGL+wr7/LEAj60mDTRrlcC j9S9uYq0OgKAXjbKmgfb8BV4UvBY/in+sypjPieg/3VetRvPXvWQc/6XOUHoC4Jv2f8e iXSgf9MYOI5s7pUIAD7eDmYDpIN3FUcfZU73lY6CWlK3fL+NauJtNMILI6k1/u9Zd6UG DTe6qMJ3BVO+Q5XHjiBW2UoBXc4blcli+WWJG4dQonI73YUQGXV5zM8fxqlkZW+DrTQg ZPnQ== X-Gm-Message-State: AOAM533oU7hGxX9Emr8Gn6o6JnFVxjKa+OMZjdhWHGgQeu8wvgfshiEE sT2JqHPwET1EHV7tOzXh+/E= X-Google-Smtp-Source: ABdhPJx/sayror46Z7wGue3FFjKMT421BJ4orbbr+l4Z6PeESGkXXJFxM1M/acznkrc6XhG4BAJfZQ== X-Received: by 2002:a17:902:f54d:b029:128:e54f:48f5 with SMTP id h13-20020a170902f54db0290128e54f48f5mr2487765plf.68.1625195745655; Thu, 01 Jul 2021 20:15:45 -0700 (PDT) Received: from localhost ([2601:647:4b01:ae80:74bf:2ea3:bb8f:d776]) by smtp.gmail.com with ESMTPSA id v8sm1476833pff.34.2021.07.01.20.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 20:15:45 -0700 (PDT) Date: Thu, 1 Jul 2021 20:15:44 -0700 From: Fangrui Song To: Kito Cheng Cc: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, jimw@sifive.com Subject: Re: [PATCH] docs: Add 'S' to Machine Constraints for RISC-V Message-ID: <20210702031544.tcn23zshl4pnzouu@gmail.com> References: <20210702023010.53289-1-kito.cheng@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210702023010.53289-1-kito.cheng@sifive.com> X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: , X-List-Received-Date: Fri, 02 Jul 2021 03:15:48 -0000 On 2021-07-02, Kito Cheng wrote: >It was undocument before, but already used in linux kernel, so LLVM >community suggest we should document that, so that make it become >supported/documented/non-internal machine constraints. > >gcc/ChangeLog: > > PR target/101275 > * doc/md.text (Machine Constraints): Document the 'S' constraints > for RISC-V. >--- > gcc/doc/md.texi | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi >index 00caf3844cc..b776623e8a5 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 constant call address. >+ > @end table > > @item RX---@file{config/rx/constraints.md} >-- >2.31.1 > Thanks for the patch! To clarify, 'S' is used by the aarch64 port of the Linux kernel. (https://github.com/ClangBuiltLinux/linux/issues/13) It was proposed as one way to make __vdso_rt_sigreturn in arch/riscv/kernel/signal.c less hacky but we have agreed that riscv should just use the existing mechanism (e.g. arch/arm64/kernel/vdso/gen_vdso_offsets.sh) as used by a few other ports. That said, 'S' is still useful as it enables flexible modifiers (e.g. `%got_pcrel_hi, %pcrel_hi`) in inline asm.