public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: document -m[no-]explicit-relocs
@ 2022-07-27  7:06 Xi Ruoyao
  2022-07-27  7:21 ` WANG Xuerui
  0 siblings, 1 reply; 7+ messages in thread
From: Xi Ruoyao @ 2022-07-27  7:06 UTC (permalink / raw)
  To: Lulu Cheng, gcc-patches; +Cc: xuchenghua, Wang Xuerui

Document newly introduced -m[no-]explicit-relocs options.  Ok for trunk?

-- >8 --

gcc/ChangeLog:

	* doc/invoke.texi: Document -m[no-]explicit-relocs for
	LoongArch.
---
 gcc/doc/invoke.texi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9a3f2d14c5a..04418f80428 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -24939,6 +24939,18 @@ global symbol: The data got table must be within +/-8EiB addressing space.
 @end itemize
 @end table
 The default code model is @code{normal}.
+
+@item -mexplicit-relocs
+@itemx -mno-explicit-relocs
+@opindex mexplicit-relocs
+@opindex mno-explicit-relocs
+Generate (do not generate) explicit symbol relocations instead of
+assembler macros.  Using explicit relocations can improve code generation.
+GCC detects the capaiblities of the assembler when it is built and sets
+the default to @code{-mexplicit-relocs} if the assembler supports the
+syntax for explicit specification of relocations, and
+@code{-mno-explicit-relocs} otherwise.  This option is mostly useful for
+debugging or using an assembler different from build-time.
 @end table
 
 @node M32C Options
-- 
2.37.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] LoongArch: document -m[no-]explicit-relocs
  2022-07-27  7:06 [PATCH] LoongArch: document -m[no-]explicit-relocs Xi Ruoyao
@ 2022-07-27  7:21 ` WANG Xuerui
  2022-07-27  8:47   ` Lulu Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: WANG Xuerui @ 2022-07-27  7:21 UTC (permalink / raw)
  To: Xi Ruoyao, Lulu Cheng, gcc-patches; +Cc: xuchenghua

Hi,

On 2022/7/27 15:06, Xi Ruoyao wrote:
> Document newly introduced -m[no-]explicit-relocs options.  Ok for trunk?
>
> -- >8 --
>
> gcc/ChangeLog:
>
> 	* doc/invoke.texi: Document -m[no-]explicit-relocs for
> 	LoongArch.
> ---
>   gcc/doc/invoke.texi | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 9a3f2d14c5a..04418f80428 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -24939,6 +24939,18 @@ global symbol: The data got table must be within +/-8EiB addressing space.
>   @end itemize
>   @end table
>   The default code model is @code{normal}.
> +
> +@item -mexplicit-relocs
> +@itemx -mno-explicit-relocs
> +@opindex mexplicit-relocs
> +@opindex mno-explicit-relocs
> +Generate (do not generate) explicit symbol relocations instead of
> +assembler macros.  Using explicit relocations can improve code generation.
> +GCC detects the capaiblities of the assembler when it is built and sets
> +the default to @code{-mexplicit-relocs} if the assembler supports the
> +syntax for explicit specification of relocations, and
> +@code{-mno-explicit-relocs} otherwise.  This option is mostly useful for
> +debugging or using an assembler different from build-time.

Some text massaging, along with some shameful copying from other (read: 
RISC-V) -mexplicit-relocs docs...

"Use or do not use assembler relocation operators when dealing with 
symbolic addresses. The alternative is to use assembler macros instead, 
which may limit optimization.

The default value for the option is determined during GCC build-time by 
detecting corresponding assembler support: @code{-mexplicit-relocs} if 
said support is present, @code{-mno-explicit-relocs} otherwise. This 
option is mostly useful for debugging, or interoperation with assemblers 
different from the build-time one."

What do you think?

>   @end table
>   
>   @node M32C Options

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] LoongArch: document -m[no-]explicit-relocs
  2022-07-27  7:21 ` WANG Xuerui
@ 2022-07-27  8:47   ` Lulu Cheng
  2022-07-27  9:15     ` Xi Ruoyao
  0 siblings, 1 reply; 7+ messages in thread
From: Lulu Cheng @ 2022-07-27  8:47 UTC (permalink / raw)
  To: WANG Xuerui, Xi Ruoyao, gcc-patches; +Cc: xuchenghua


在 2022/7/27 下午3:21, WANG Xuerui 写道:
> Hi,
>
> On 2022/7/27 15:06, Xi Ruoyao wrote:
>> Document newly introduced -m[no-]explicit-relocs options.  Ok for trunk?
>>
>> -- >8 --
>>
>> gcc/ChangeLog:
>>
>>     * doc/invoke.texi: Document -m[no-]explicit-relocs for
>>     LoongArch.
>> ---
>>   gcc/doc/invoke.texi | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
>> index 9a3f2d14c5a..04418f80428 100644
>> --- a/gcc/doc/invoke.texi
>> +++ b/gcc/doc/invoke.texi
>> @@ -24939,6 +24939,18 @@ global symbol: The data got table must be 
>> within +/-8EiB addressing space.
>>   @end itemize
>>   @end table
>>   The default code model is @code{normal}.
>> +
>> +@item -mexplicit-relocs
>> +@itemx -mno-explicit-relocs
>> +@opindex mexplicit-relocs
>> +@opindex mno-explicit-relocs
>> +Generate (do not generate) explicit symbol relocations instead of
>> +assembler macros.  Using explicit relocations can improve code 
>> generation.
>> +GCC detects the capaiblities of the assembler when it is built and sets
>> +the default to @code{-mexplicit-relocs} if the assembler supports the
>> +syntax for explicit specification of relocations, and
>> +@code{-mno-explicit-relocs} otherwise.  This option is mostly useful 
>> for
>> +debugging or using an assembler different from build-time.
>
> Some text massaging, along with some shameful copying from other 
> (read: RISC-V) -mexplicit-relocs docs...
>
> "Use or do not use assembler relocation operators when dealing with 
> symbolic addresses. The alternative is to use assembler macros 
> instead, which may limit optimization.
>
> The default value for the option is determined during GCC build-time 
> by detecting corresponding assembler support: @code{-mexplicit-relocs} 
> if said support is present, @code{-mno-explicit-relocs} otherwise. 
> This option is mostly useful for debugging, or interoperation with 
> assemblers different from the build-time one."
>
> What do you think?
>
>>   @end table
>>     @node M32C Options

I agree with wangxuerui's idea.

The same parameter and the same description information can reduce the 
user's time to learn how to use this parameter.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] LoongArch: document -m[no-]explicit-relocs
  2022-07-27  8:47   ` Lulu Cheng
@ 2022-07-27  9:15     ` Xi Ruoyao
  2022-07-27  9:28       ` Lulu Cheng
  0 siblings, 1 reply; 7+ messages in thread
From: Xi Ruoyao @ 2022-07-27  9:15 UTC (permalink / raw)
  To: Lulu Cheng, WANG Xuerui, gcc-patches; +Cc: xuchenghua

On Wed, 2022-07-27 at 16:47 +0800, Lulu Cheng wrote:

> >  "Use or do not use assembler relocation operators when dealing with
> > symbolic addresses. The alternative is to use assembler macros
> > instead, which may limit optimization. 
> >  
> >  The default value for the option is determined during GCC build-
> > time by detecting corresponding assembler support: @code{-mexplicit-
> > relocs} if said support is present, @code{-mno-explicit-relocs}
> > otherwise. This option is mostly useful for debugging, or
> > interoperation with assemblers different from the build-time one." 
> >  
> I agree with wangxuerui's idea.
> The same parameter and the same description information can reduce the
> user's time to learn how to use this parameter.

I agree it's better than my origin paragraph.

If you agree I'll commit it with Xuerui as the commit author.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] LoongArch: document -m[no-]explicit-relocs
  2022-07-27  9:15     ` Xi Ruoyao
@ 2022-07-27  9:28       ` Lulu Cheng
  2022-07-27  9:57         ` WANG Xuerui
  0 siblings, 1 reply; 7+ messages in thread
From: Lulu Cheng @ 2022-07-27  9:28 UTC (permalink / raw)
  To: Xi Ruoyao, WANG Xuerui, gcc-patches; +Cc: xuchenghua


在 2022/7/27 下午5:15, Xi Ruoyao 写道:
> On Wed, 2022-07-27 at 16:47 +0800, Lulu Cheng wrote:
>
>>>   "Use or do not use assembler relocation operators when dealing with
>>> symbolic addresses. The alternative is to use assembler macros
>>> instead, which may limit optimization.
>>>   
>>>   The default value for the option is determined during GCC build-
>>> time by detecting corresponding assembler support: @code{-mexplicit-
>>> relocs} if said support is present, @code{-mno-explicit-relocs}
>>> otherwise. This option is mostly useful for debugging, or
>>> interoperation with assemblers different from the build-time one."
>>>   
>> I agree with wangxuerui's idea.
>> The same parameter and the same description information can reduce the
>> user's time to learn how to use this parameter.
> I agree it's better than my origin paragraph.
>
> If you agree I'll commit it with Xuerui as the commit author.
>

I have no opinion if wangxuerui agrees.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] LoongArch: document -m[no-]explicit-relocs
  2022-07-27  9:28       ` Lulu Cheng
@ 2022-07-27  9:57         ` WANG Xuerui
  2022-07-27 13:18           ` Xi Ruoyao
  0 siblings, 1 reply; 7+ messages in thread
From: WANG Xuerui @ 2022-07-27  9:57 UTC (permalink / raw)
  To: Lulu Cheng, Xi Ruoyao, gcc-patches; +Cc: xuchenghua

On 2022/7/27 17:28, Lulu Cheng wrote:
>
>
> 在 2022/7/27 下午5:15, Xi Ruoyao 写道:
>> On Wed, 2022-07-27 at 16:47 +0800, Lulu Cheng wrote:
>>
>>>>   "Use or do not use assembler relocation operators when dealing with
>>>> symbolic addresses. The alternative is to use assembler macros
>>>> instead, which may limit optimization.
>>>>   
>>>>   The default value for the option is determined during GCC build-
>>>> time by detecting corresponding assembler support: @code{-mexplicit-
>>>> relocs} if said support is present, @code{-mno-explicit-relocs}
>>>> otherwise. This option is mostly useful for debugging, or
>>>> interoperation with assemblers different from the build-time one."
>>>>   
>>> I agree with wangxuerui's idea.
>>> The same parameter and the same description information can reduce the
>>> user's time to learn how to use this parameter.
>> I agree it's better than my origin paragraph.
>>
>> If you agree I'll commit it with Xuerui as the commit author.
>>
>
> I have no opinion if wangxuerui agrees.
Either is OK (if you really think the commit is effectively rewritten by 
me), thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] LoongArch: document -m[no-]explicit-relocs
  2022-07-27  9:57         ` WANG Xuerui
@ 2022-07-27 13:18           ` Xi Ruoyao
  0 siblings, 0 replies; 7+ messages in thread
From: Xi Ruoyao @ 2022-07-27 13:18 UTC (permalink / raw)
  To: WANG Xuerui, Lulu Cheng, gcc-patches; +Cc: xuchenghua

On Wed, 2022-07-27 at 17:57 +0800, WANG Xuerui wrote:
> On 2022/7/27 17:28, Lulu Cheng wrote:
> > 
> > 
> > 在 2022/7/27 下午5:15, Xi Ruoyao 写道:
> > > On Wed, 2022-07-27 at 16:47 +0800, Lulu Cheng wrote:
> > > 
> > > > >   "Use or do not use assembler relocation operators when dealing with
> > > > > symbolic addresses. The alternative is to use assembler macros
> > > > > instead, which may limit optimization.
> > > > >   
> > > > >   The default value for the option is determined during GCC build-
> > > > > time by detecting corresponding assembler support: @code{-mexplicit-
> > > > > relocs} if said support is present, @code{-mno-explicit-relocs}
> > > > > otherwise. This option is mostly useful for debugging, or
> > > > > interoperation with assemblers different from the build-time one."
> > > > >   
> > > > I agree with wangxuerui's idea.
> > > > The same parameter and the same description information can reduce the
> > > > user's time to learn how to use this parameter.
> > > I agree it's better than my origin paragraph.
> > > 
> > > If you agree I'll commit it with Xuerui as the commit author.
> > > 
> > 
> > I have no opinion if wangxuerui agrees.
> Either is OK (if you really think the commit is effectively rewritten by 
> me), thanks.

Pushed r13-1859.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-27 13:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27  7:06 [PATCH] LoongArch: document -m[no-]explicit-relocs Xi Ruoyao
2022-07-27  7:21 ` WANG Xuerui
2022-07-27  8:47   ` Lulu Cheng
2022-07-27  9:15     ` Xi Ruoyao
2022-07-27  9:28       ` Lulu Cheng
2022-07-27  9:57         ` WANG Xuerui
2022-07-27 13:18           ` Xi Ruoyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).