Message ID | 20171101005406.18684-1-palmer@dabbelt.com |
---|---|
State | New |
Headers | show |
Series | RISC-V: Document the medlow and medany code models | expand |
On 10/31/2017 06:54 PM, Palmer Dabbelt wrote: > This documentation is patterned off the aarch64 -mcmodel documentation. > > gcc/ChangeLog: > > 2017-10-31 Palmer Dabbelt <palmer@dabbelt.com> > > * doc/invoke.texi (RISC-V Options): Explicitly name the medlow > and medany code models, and describe what they do. > --- > gcc/doc/invoke.texi | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi > index 43acbcbbcd77..8903afaeeffc 100644 > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > @@ -989,7 +989,7 @@ See RS/6000 and PowerPC Options. > -msmall-data-limit=@var{N-bytes} @gol > -msave-restore -mno-save-restore @gol > -mstrict-align -mno-strict-align @gol > --mcmodel=@var{code-model} @gol > +-mcmodel=medlow -mcmodel=medany @gol > -mexplicit-relocs -mno-explicit-relocs @gol} > > @emph{RL78 Options} Hmmm. I have a mild preference for keeping the metasyntactic variable in the option documentation and using a nested table to list the possible values, but I see that the documentation for other backends that support this option are not consistent, so I guess it is OK to expand it like that as long as you don't anticipate adding additional keywords in the future. > @@ -21765,9 +21765,18 @@ Use smaller but slower prologue and epilogue code. > @opindex mstrict-align > Do not generate unaligned memory accesses. > > -@item -mcmodel=@var{code-model} > -@opindex mcmodel > -Specify the code model. > +@item -mcmodel=medlow > +@opindex mcmodel=medlow > +Generate code for the medium-low code model. The program and its statically > +defined symbols must lie within a single 2 GiB address range and must lie > +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or > +dynamically linked. This is the default code model. > + > +@item -mcmodel=medany > +@opindex mcmodel=medany > +Generate code for the medium-any code model. The program and its statically > +defined symbols must be within any single 2 GiB address range. Programs can be > +statically or dynamically linked. > > @end table s/statically defined symbols/statically-defined symbols/g Bonus points if you make that fix in the aarch64 documentation you copied this from, too. :-) -Sandra
I have to disagree. It's standard to not hyphenate an adverb-adjective compound, since they tend not to be ambiguous. But if the standard in the GCC documentation is to hyphenate, I will not stand in the way! On Tue, Oct 31, 2017 at 8:47 PM, Sandra Loosemore <sandra@codesourcery.com> wrote: > On 10/31/2017 06:54 PM, Palmer Dabbelt wrote: >> >> This documentation is patterned off the aarch64 -mcmodel documentation. >> >> gcc/ChangeLog: >> >> 2017-10-31 Palmer Dabbelt <palmer@dabbelt.com> >> >> * doc/invoke.texi (RISC-V Options): Explicitly name the medlow >> and medany code models, and describe what they do. >> --- >> gcc/doc/invoke.texi | 17 +++++++++++++---- >> 1 file changed, 13 insertions(+), 4 deletions(-) >> >> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi >> index 43acbcbbcd77..8903afaeeffc 100644 >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -989,7 +989,7 @@ See RS/6000 and PowerPC Options. >> -msmall-data-limit=@var{N-bytes} @gol >> -msave-restore -mno-save-restore @gol >> -mstrict-align -mno-strict-align @gol >> --mcmodel=@var{code-model} @gol >> +-mcmodel=medlow -mcmodel=medany @gol >> -mexplicit-relocs -mno-explicit-relocs @gol} >> >> @emph{RL78 Options} > > > Hmmm. I have a mild preference for keeping the metasyntactic variable in > the option documentation and using a nested table to list the possible > values, but I see that the documentation for other backends that support > this option are not consistent, so I guess it is OK to expand it like that > as long as you don't anticipate adding additional keywords in the future. > >> @@ -21765,9 +21765,18 @@ Use smaller but slower prologue and epilogue >> code. >> @opindex mstrict-align >> Do not generate unaligned memory accesses. >> >> -@item -mcmodel=@var{code-model} >> -@opindex mcmodel >> -Specify the code model. >> +@item -mcmodel=medlow >> +@opindex mcmodel=medlow >> +Generate code for the medium-low code model. The program and its >> statically >> +defined symbols must lie within a single 2 GiB address range and must lie >> +between absolute addresses -2 GiB and +2 GiB. Programs can be statically >> or >> +dynamically linked. This is the default code model. >> + >> +@item -mcmodel=medany >> +@opindex mcmodel=medany >> +Generate code for the medium-any code model. The program and its >> statically >> +defined symbols must be within any single 2 GiB address range. Programs >> can be >> +statically or dynamically linked. >> >> @end table > > > s/statically defined symbols/statically-defined symbols/g > > Bonus points if you make that fix in the aarch64 documentation you copied > this from, too. :-) > > -Sandra >
On 10/31/2017 10:27 PM, Andrew Waterman wrote: > I have to disagree. It's standard to not hyphenate an > adverb-adjective compound, since they tend not to be ambiguous. But > if the standard in the GCC documentation is to hyphenate, I will not > stand in the way! Heh, you got me on this one -- it's one of those weird special cases, the "adverb ending in -ly plus participle" case listed here: http://www.chicagomanualofstyle.org/16/images/ch07_tab01.pdf So the patch is OK as-is, but maybe I need a few new brain cells. :-P -Sandra
Thanks for caring enough about our patches to even notice the grammar :) On Tue, Oct 31, 2017 at 11:09 PM, Sandra Loosemore <sandra@codesourcery.com> wrote: > On 10/31/2017 10:27 PM, Andrew Waterman wrote: >> >> I have to disagree. It's standard to not hyphenate an >> adverb-adjective compound, since they tend not to be ambiguous. But >> if the standard in the GCC documentation is to hyphenate, I will not >> stand in the way! > > > Heh, you got me on this one -- it's one of those weird special cases, the > "adverb ending in -ly plus participle" case listed here: > > http://www.chicagomanualofstyle.org/16/images/ch07_tab01.pdf > > So the patch is OK as-is, but maybe I need a few new brain cells. :-P > > -Sandra >
Committed. On Tue, 31 Oct 2017 23:37:04 PDT (-0700), Andrew Waterman wrote: > Thanks for caring enough about our patches to even notice the grammar :) > > On Tue, Oct 31, 2017 at 11:09 PM, Sandra Loosemore > <sandra@codesourcery.com> wrote: >> On 10/31/2017 10:27 PM, Andrew Waterman wrote: >>> >>> I have to disagree. It's standard to not hyphenate an >>> adverb-adjective compound, since they tend not to be ambiguous. But >>> if the standard in the GCC documentation is to hyphenate, I will not >>> stand in the way! >> >> >> Heh, you got me on this one -- it's one of those weird special cases, the >> "adverb ending in -ly plus participle" case listed here: >> >> http://www.chicagomanualofstyle.org/16/images/ch07_tab01.pdf >> >> So the patch is OK as-is, but maybe I need a few new brain cells. :-P >> >> -Sandra >>
On Tue, 31 Oct 2017, Palmer Dabbelt wrote:
> +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or
That should be @minus{}2 GiB, to get a minus sign instead of a hyphen.
On Wed, 01 Nov 2017 14:59:43 PDT (-0700), joseph@codesourcery.com wrote: > On Tue, 31 Oct 2017, Palmer Dabbelt wrote: > >> +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or > > That should be @minus{}2 GiB, to get a minus sign instead of a hyphen. Oops, I already committed it. How does this look? * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB". diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 8903afaeeffc..fc5c4f975a2b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21769,8 +21769,8 @@ Do not generate unaligned memory accesses. @opindex mcmodel=medlow Generate code for the medium-low code model. The program and its statically defined symbols must lie within a single 2 GiB address range and must lie -between absolute addresses -2 GiB and +2 GiB. Programs can be statically or -dynamically linked. This is the default code model. +between absolute addresses @minus{}2 GiB and +2 GiB. Programs can be +statically or dynamically linked. This is the default code model. @item -mcmodel=medany @opindex mcmodel=medany
On Wed, 1 Nov 2017, Palmer Dabbelt wrote: > On Wed, 01 Nov 2017 14:59:43 PDT (-0700), joseph@codesourcery.com wrote: > > On Tue, 31 Oct 2017, Palmer Dabbelt wrote: > > > >> +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or > > > > That should be @minus{}2 GiB, to get a minus sign instead of a hyphen. > > Oops, I already committed it. How does this look? > > * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB". That looks OK.
On Wed, 01 Nov 2017 15:07:59 PDT (-0700), joseph@codesourcery.com wrote: > On Wed, 1 Nov 2017, Palmer Dabbelt wrote: > >> On Wed, 01 Nov 2017 14:59:43 PDT (-0700), joseph@codesourcery.com wrote: >> > On Tue, 31 Oct 2017, Palmer Dabbelt wrote: >> > >> >> +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or >> > >> > That should be @minus{}2 GiB, to get a minus sign instead of a hyphen. >> >> Oops, I already committed it. How does this look? >> >> * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB". > > That looks OK. Committed. Thanks!
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 43acbcbbcd77..8903afaeeffc 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -989,7 +989,7 @@ See RS/6000 and PowerPC Options. -msmall-data-limit=@var{N-bytes} @gol -msave-restore -mno-save-restore @gol -mstrict-align -mno-strict-align @gol --mcmodel=@var{code-model} @gol +-mcmodel=medlow -mcmodel=medany @gol -mexplicit-relocs -mno-explicit-relocs @gol} @emph{RL78 Options} @@ -21765,9 +21765,18 @@ Use smaller but slower prologue and epilogue code. @opindex mstrict-align Do not generate unaligned memory accesses. -@item -mcmodel=@var{code-model} -@opindex mcmodel -Specify the code model. +@item -mcmodel=medlow +@opindex mcmodel=medlow +Generate code for the medium-low code model. The program and its statically +defined symbols must lie within a single 2 GiB address range and must lie +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or +dynamically linked. This is the default code model. + +@item -mcmodel=medany +@opindex mcmodel=medany +Generate code for the medium-any code model. The program and its statically +defined symbols must be within any single 2 GiB address range. Programs can be +statically or dynamically linked. @end table