From patchwork Thu Oct 19 14:03:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 155585 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp406479vqb; Thu, 19 Oct 2023 07:05:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsIvTmN43w/Tujaj7dkfPFzEI+anuKwIc+CcNzXpe1wuIX9tTIKWag3NH7CwZXxyVlH+Q/ X-Received: by 2002:a05:620a:4116:b0:778:94cc:723 with SMTP id j22-20020a05620a411600b0077894cc0723mr2184261qko.1.1697724313890; Thu, 19 Oct 2023 07:05:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697724313; cv=pass; d=google.com; s=arc-20160816; b=rBotUZoP5E4R0MKYLYKFmdCmX6Gafwm9yLVxd3WxGDrAEFKgs1QDmG6YpMK/O01i3o q5WRKpicnFJeie4KX/sxlpOJstBEmUv5mhAUanJCEFuxEwM6t7HoVf/pLR+HnDVjjp9H sT99z7zEhB4SLj7d6Et73rFZx6WzjgqBhRxK+pqq+7sd82zlb2bpGrYGyZdaVaH3AlZc yno88eKmF05E0+a3LmIK/Lyx0X2je9OzbSoCu3TO1LN5kZb99Ve1CMT+lNmmlJJZpNre VmJnSJTQVzstXz6gLhh+28oVJRag/2UVweE/KGpu6ntklXXBttGMHHJbc1z9o3NXOLHa kWbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to: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 :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=QkFQgvjVAVpZsTSFhnXx7z+8D2snZK2OCkb96ZItH0k=; fh=Q6zU0KPK9mkW4WcCQLO/dI9yShCKJrND2oM6Xx6eTlQ=; b=yLK1P3Mf2Q/OCpU6qcf7nLpaLsrqzuHu2n5XDn3rMyApQnRH7eUnNuqG9yWW8iEBtw HjWAu8sdOf2aUocFD+LxYLhreD1sz761barhxO4K1mGE/fKooZ9vFpNo3DvS15sjxtu3 TDipeZHcW428jUzDCzA2dz2NLOjL+xbeFPF9m59BoYY77E2UZ2VU3vwkibCgmNE4cUTC eriGg8jgaGT2C+rc6rmZ0cybHJ5NQGbHF9WQZzaqtLhRJeWD1cacxq1LSp74QvFaDaUf 4JJxcWSI0vSrtk69N6WJKUBbx+5y2TcXRjRnr9lE43CTtKCbkW8FEohOVduClcMrnY0i kMKQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=nYvRKuOt; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id v10-20020a05620a0a8a00b00773dc332a78si1567882qkg.420.2023.10.19.07.05.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 07:05:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=nYvRKuOt; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63B103856974 for ; Thu, 19 Oct 2023 14:04:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id E7C7B385417F for ; Thu, 19 Oct 2023 14:03:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E7C7B385417F Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E7C7B385417F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:683e::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697724234; cv=none; b=jk/pjkR5utgOH63LpfLx1uP6ZP6FRs6g5Y36NypySdiPb9xGbQPyf27h37eBbdqYGXEEDr51zShGV0YJbtdcb5EnxzVeayz2viYivcCaxWXVQ6nPm5Lh7yPnb5XaCeUOWI0l/4boT0OoAwz/yxc8UkQ2mSN28SSURL/RAruyRZw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697724234; c=relaxed/simple; bh=XpY8rs7wcfBuuxiG3acSJD6QPa/y6hu7PV5Y0rIADkg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=VaakUPto+JnpVDXRaUxa5TixXwkT92f9GXAWwyBeNDb6NUP4udCd1qnRp+nTeZwU74wpWrrGKs2yaMYNrj7yPwYDE/EpBsWHkwrCobpPkz9RHjYSOO19QGmamApqqqF5Huqt0zLmR6dKvmkA4Et5+jixIonX8IWvJxtoQ816W+E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1697724230; bh=XpY8rs7wcfBuuxiG3acSJD6QPa/y6hu7PV5Y0rIADkg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nYvRKuOt+rHry3bNB1mUOKZkcYgPHtTEpJN5YQk0yLj05LPW7mBs8fTHHfP907Qgh MFwi9twAuQiBHohUr2rMR7pQg/6UumTnWhKL5A7/Em6L2GjmKfCEEWG0aWd6RYSfRU +9RXcZrMNjACM1x6wzkbsC6Ttj26KkTLN3ORkfjY= Received: from stargazer.. (unknown [IPv6:240e:358:1126:f000:dc73:854d:832e:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 8597766AF7; Thu, 19 Oct 2023 10:03:42 -0400 (EDT) From: Xi Ruoyao To: gcc-patches@gcc.gnu.org Cc: chenglulu , i@xen0n.name, xuchenghua@loongson.cn, mengqinggang , Xi Ruoyao Subject: [PATCH 5/5] LoongArch: Document -mexplicit-relocs={auto,none,always} Date: Thu, 19 Oct 2023 22:03:00 +0800 Message-ID: <20231019140300.50323-6-xry111@xry111.site> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231019140300.50323-1-xry111@xry111.site> References: <20231019140300.50323-1-xry111@xry111.site> MIME-Version: 1.0 X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, LIKELY_SPAM_FROM, SPF_HELO_PASS, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780192970299654300 X-GMAIL-MSGID: 1780192970299654300 gcc/ChangeLog: * doc/invoke.texi (-mexplicit-relocs=style): Document. (-mexplicit-relocs): Document as an alias of -mexplicit-relocs=always. (-mno-explicit-relocs): Document as an alias of -mexplicit-relocs=none. (-mcmodel=extreme): Mention -mexplicit-relocs=always instead of -mexplicit-relocs. --- gcc/doc/invoke.texi | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 16c45843123..f4633715e2b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1038,7 +1038,7 @@ Objective-C and Objective-C++ Dialects}. -mcond-move-float -mno-cond-move-float -memcpy -mno-memcpy -mstrict-align -mno-strict-align -mmax-inline-memcpy-size=@var{n} --mexplicit-relocs -mno-explicit-relocs +-mexplicit-relocs=@var{style} -mexplicit-relocs -mno-explicit-relocs -mdirect-extern-access -mno-direct-extern-access -mcmodel=@var{code-model}} @@ -26194,26 +26194,39 @@ The text segment and data segment must be within 2GB addressing space. @item extreme This mode does not limit the size of the code segment and data segment. -The @option{-mcmodel=extreme} option is incompatible with @option{-fplt} and -@option{-mno-explicit-relocs}. +The @option{-mcmodel=extreme} option is incompatible with @option{-fplt}, +and it requires @option{-mexplicit-relocs=always}. @end table The default code model is @code{normal}. -@opindex mexplicit-relocs -@opindex mno-explicit-relocs -@item -mexplicit-relocs -@itemx -mno-explicit-relocs -Use or do not use assembler relocation operators when dealing with symbolic +@item -mexplicit-relocs=@var{style} +Set when to use assembler relocation operators when dealing with symbolic addresses. The alternative is to use assembler macros instead, which may -limit instruction scheduling but allow linker relaxation. The default +limit instruction scheduling but allow linker relaxation. +with @option{-mexplicit-relocs=none} the assembler macros are always used, +with @option{-mexplicit-relocs=always} the assembler relocation operators +are always used, with @option{-mexplicit-relocs=auto} the compiler will +use the relocation operators where the linker relaxation is impossible to +improve the code quality, and macros elsewhere. The default value for the option is determined during GCC build-time by detecting corresponding assembler support: -@code{-mno-explicit-relocs} if the assembler supports relaxation or it -does not support relocation operators at all, -@code{-mexplicit-relocs} otherwise. This option is mostly useful for +@option{-mexplicit-relocs=none} if the assembler does not support +relocation operators at all, +@option{-mexplicit-relocs=always} if the assembler supports relocation +operators but does not support relaxation, +@option{-mexplicit-relocs=auto} if the assembler supports both relocation +operators and relaxation. This option is mostly useful for debugging, or interoperation with assemblers different from the build-time one. +@opindex mexplicit-relocs +@item -mexplicit-relocs +An alias of @option{-mexplicit-relocs=always} for backward compatibility. + +@opindex mno-explicit-relocs +@item -mno-explicit-relocs +An alias of @option{-mexplicit-relocs=none} for backward compatibility. + @opindex mdirect-extern-access @item -mdirect-extern-access @itemx -mno-direct-extern-access