[19/20] doc, pdp11: Clean up PDP-11 documentation [PR122243]

Message ID 20251207001030.1024365-20-sloosemore@baylibre.com
State New
Headers
Series Second set of doc updates for target-specific options |

Commit Message

Sandra Loosemore Dec. 7, 2025, 12:10 a.m. UTC
  While working on this patch I saw that this target has an -mlra option
that still defaults to off.  Although the LRA support was added in
2018 apparently it wasn't robust enough to enable by default.  We are
supposed to be deleting reload support and all targets that don't use
LRA by default in GCC 16, so this target may be declared obsolete very
soon, but I've made the documentation of other options consistent with
the .opt files and conventions used for other targets anyway in case
either somebody who can build/test for this target switches the
default (see PR target/113947) or the reload removal is postponed.

gcc/ChangeLog
	PR other/122243
	* doc/invoke.texi (Option Summary) <PDP-11 Options>: Remove
	redundant -mno- forms from the list.
	(PDP-11 Options): Fix some markup issues.  Merge documentation
	of positive and negative forms of -mac0.  Index negative forms
	of -m40, -m45, -msplit, -mlra.
---
 gcc/doc/invoke.texi | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)
  

Comments

Paul Koning Dec. 7, 2025, 8:18 p.m. UTC | #1
The pdp-11 changes look mostly ok but I have two questions.  
1. Why did you remove -munix-asm, mdec-asm and -mgnu-asm along with -mlro from the gccoptlist at the top?
2. -m40 and -m45 aren't supposed to have negative forms.  I guess I'm missing RejectNegative in the option definition.

	paul

> On Dec 6, 2025, at 7:10 PM, Sandra Loosemore <sloosemore@baylibre.com> wrote:
> 
> While working on this patch I saw that this target has an -mlra option
> that still defaults to off.  Although the LRA support was added in
> 2018 apparently it wasn't robust enough to enable by default.  We are
> supposed to be deleting reload support and all targets that don't use
> LRA by default in GCC 16, so this target may be declared obsolete very
> soon, but I've made the documentation of other options consistent with
> the .opt files and conventions used for other targets anyway in case
> either somebody who can build/test for this target switches the
> default (see PR target/113947) or the reload removal is postponed.
> 
> gcc/ChangeLog
> PR other/122243
> * doc/invoke.texi (Option Summary) <PDP-11 Options>: Remove
> redundant -mno- forms from the list.
> (PDP-11 Options): Fix some markup issues.  Merge documentation
> of positive and negative forms of -mac0.  Index negative forms
> of -m40, -m45, -msplit, -mlra.
> ---
> gcc/doc/invoke.texi | 28 +++++++++++++++++-----------
> 1 file changed, 17 insertions(+), 11 deletions(-)
> 
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index f403d20bc0b..413259f2fe3 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -1292,8 +1292,8 @@ Objective-C and Objective-C++ Dialects}.
> -mcmodel=@var{code-model}}
> 
> @emph{PDP-11 Options} (@ref{PDP-11 Options})
> -@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
> --mint32  -mno-int16  -mint16  -mno-int32
> +@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
> +-mint32  -mint16
> -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}
> 
> @emph{PowerPC Options}
> @@ -31675,31 +31675,35 @@ These options are defined for the PDP-11:
> @opindex mfpu
> @item -mfpu
> Use hardware FPP floating point.  This is the default.  (FIS floating
> -point on the PDP-11/40 is not supported.)  Implies -m45.
> +point on the PDP-11/40 is not supported.)  Implies @option{-m45}.
> 
> @opindex msoft-float
> @item -msoft-float
> Do not use hardware floating point.
> 
> @opindex mac0
> -@item -mac0
> -Return floating-point results in ac0 (fr0 in Unix assembler syntax).
> -
> @opindex mno-ac0
> -@item -mno-ac0
> -Return floating-point results in memory.  This is the default.
> +@item -mac0
> +@itemx -mno-ac0
> +With @option{-mac0}, return floating-point results in ac0
> +(fr0 in Unix assembler syntax).  The default, @option{-mno-ac0}, is
> +to return floating-point results in memory.
> 
> @opindex m40
> +@opindex mno-40
> @item -m40
> -Generate code for a PDP-11/40.  Implies -msoft-float -mno-split.
> +Generate code for a PDP-11/40.
> +Implies @option{-msoft-float} @option{-mno-split}.
> 
> @opindex m45
> +@opindex mno-45
> @item -m45
> Generate code for a PDP-11/45.  This is the default.
> 
> @opindex m10
> @item -m10
> -Generate code for a PDP-11/10.  Implies -msoft-float -mno-split.
> +Generate code for a PDP-11/10.
> +Implies @option{-msoft-float} @option{-mno-split}.
> 
> @opindex mint16
> @opindex mno-int32
> @@ -31714,8 +31718,9 @@ Use 16-bit @code{int}.  This is the default.
> Use 32-bit @code{int}.
> 
> @opindex msplit
> +@opindex mno-split
> @item -msplit
> -Target has split instruction and data space.  Implies -m45.
> +Target has split instruction and data space.  Implies @option{-m45}.
> 
> @opindex munix-asm
> @item -munix-asm
> @@ -31730,6 +31735,7 @@ Use DEC assembler syntax.
> Use GNU assembler syntax.  This is the default.
> 
> @opindex mlra
> +@opindex mno-lra
> @item -mlra
> Use the new LRA register allocator.  By default, the old ``reload''
> allocator is used.
> -- 
> 2.39.5
>
  
Sandra Loosemore Dec. 7, 2025, 9:36 p.m. UTC | #2
On 12/7/25 13:18, Paul Koning wrote:
> The pdp-11 changes look mostly ok but I have two questions.
> 1. Why did you remove -munix-asm, mdec-asm and -mgnu-asm along with -mlro from the gccoptlist at the top?

My patch doesn't do that.  :-)


> 2. -m40 and -m45 aren't supposed to have negative forms.  I guess I'm missing RejectNegative in the option definition.

I can make that change, as long as you think it qualifies as "obvious" 
enough that I don't need to build/regression test GCC for this target.

-Sandra
  
Paul Koning Dec. 9, 2025, 12:33 a.m. UTC | #3
> On Dec 7, 2025, at 4:36 PM, Sandra Loosemore <sloosemore@baylibre.com> wrote:
> 
> On 12/7/25 13:18, Paul Koning wrote:
>> The pdp-11 changes look mostly ok but I have two questions.
>> 1. Why did you remove -munix-asm, mdec-asm and -mgnu-asm along with -mlro from the gccoptlist at the top?
> 
> My patch doesn't do that.  :-)

Maybe I misread the diff, but it says:

@emph{PDP-11 Options} (@ref{PDP-11 Options})
-@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
--mint32  -mno-int16  -mint16  -mno-int32
+@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
+-mint32  -mint16
-msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}

which looks like the last line is going away.  Or does that content appear through some other magic?

> 
>> 2. -m40 and -m45 aren't supposed to have negative forms.  I guess I'm missing RejectNegative in the option definition.
> 
> I can make that change, as long as you think it qualifies as "obvious" enough that I don't need to build/regression test GCC for this target.

Yes, I'm comfortable with that.

	paul
  
Maciej W. Rozycki Dec. 9, 2025, 12:49 a.m. UTC | #4
On Mon, 8 Dec 2025, Paul Koning wrote:

> >> 1. Why did you remove -munix-asm, mdec-asm and -mgnu-asm along with 
> >> -mlro from the gccoptlist at the top?
> > 
> > My patch doesn't do that.  :-)
> 
> Maybe I misread the diff, but it says:
> 
> @emph{PDP-11 Options} (@ref{PDP-11 Options})
> -@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
> --mint32  -mno-int16  -mint16  -mno-int32
> +@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
> +-mint32  -mint16
> -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}
> 
> which looks like the last line is going away.  Or does that content 
> appear through some other magic?

 Something has eaten leading spaces on your side making the actual leading 
`-' character look as if it was line removal.  The patch surely shows no 
change to the final line of PDP-11 options here:

@@ -1292,8 +1292,8 @@ Objective-C and Objective-C++ Dialects}.
 -mcmodel=@var{code-model}}

 @emph{PDP-11 Options} (@ref{PDP-11 Options})
-@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
--mint32  -mno-int16  -mint16  -mno-int32
+@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
+-mint32  -mint16
 -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}

 @emph{PowerPC Options}

-- so at the very least it's reached the mailing list server intact.

  Maciej
  
Paul Koning Dec. 9, 2025, 1:06 a.m. UTC | #5
> On Dec 8, 2025, at 7:49 PM, Maciej W. Rozycki <macro@orcam.me.uk> wrote:
> 
> On Mon, 8 Dec 2025, Paul Koning wrote:
> 
>>>> 1. Why did you remove -munix-asm, mdec-asm and -mgnu-asm along with 
>>>> -mlro from the gccoptlist at the top?
>>> 
>>> My patch doesn't do that.  :-)
>> 
>> Maybe I misread the diff, but it says:
>> 
>> @emph{PDP-11 Options} (@ref{PDP-11 Options})
>> -@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
>> --mint32  -mno-int16  -mint16  -mno-int32
>> +@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
>> +-mint32  -mint16
>> -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}
>> 
>> which looks like the last line is going away.  Or does that content 
>> appear through some other magic?
> 
> Something has eaten leading spaces on your side making the actual leading 
> `-' character look as if it was line removal.  The patch surely shows no 
> change to the final line of PDP-11 options here: ...

You're quite correct.  I did not know Mac Mail had that bug.  I can see the message was delivered correctly when I examine it in "raw source" mode.

Sorry for the false alarm.

	paul
  
Sandra Loosemore Dec. 9, 2025, 1:29 a.m. UTC | #6
On 12/8/25 17:33, Paul Koning wrote:
> 
> 
>> On Dec 7, 2025, at 4:36 PM, Sandra Loosemore <sloosemore@baylibre.com> wrote:
>>
>> On 12/7/25 13:18, Paul Koning wrote:
>>> The pdp-11 changes look mostly ok but I have two questions.
>>> 1. Why did you remove -munix-asm, mdec-asm and -mgnu-asm along with -mlro from the gccoptlist at the top?
>>
>> My patch doesn't do that.  :-)
> 
> Maybe I misread the diff, but it says:
> 
> @emph{PDP-11 Options} (@ref{PDP-11 Options})
> -@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
> --mint32  -mno-int16  -mint16  -mno-int32
> +@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
> +-mint32  -mint16
> -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}
> 
> which looks like the last line is going away.  Or does that content appear through some other magic?

I think your mailer must be dropping the initial space on that line.  If 
I were deleting it, it would start "--m" instead of "-m".  Also, it 
would leave the braces unbalanced and the documentation would fail to 
build.  :-P

You might look at the mail in the archive, which is properly formatted.
https://gcc.gnu.org/pipermail/gcc-patches/2025-December/703050.html

>>> 2. -m40 and -m45 aren't supposed to have negative forms.  I guess I'm missing RejectNegative in the option definition.
>>
>> I can make that change, as long as you think it qualifies as "obvious" enough that I don't need to build/regression test GCC for this target.
> 
> Yes, I'm comfortable with that.

OK, I'll take care of it.

-Sandra
  

Patch

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f403d20bc0b..413259f2fe3 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1292,8 +1292,8 @@  Objective-C and Objective-C++ Dialects}.
 -mcmodel=@var{code-model}}
 
 @emph{PDP-11 Options} (@ref{PDP-11 Options})
-@gccoptlist{-mfpu  -msoft-float  -mac0  -mno-ac0  -m40  -m45  -m10
--mint32  -mno-int16  -mint16  -mno-int32
+@gccoptlist{-mfpu  -msoft-float  -mac0  -m40  -m45  -m10
+-mint32  -mint16
 -msplit  -munix-asm  -mdec-asm  -mgnu-asm  -mlra}
 
 @emph{PowerPC Options}
@@ -31675,31 +31675,35 @@  These options are defined for the PDP-11:
 @opindex mfpu
 @item -mfpu
 Use hardware FPP floating point.  This is the default.  (FIS floating
-point on the PDP-11/40 is not supported.)  Implies -m45.
+point on the PDP-11/40 is not supported.)  Implies @option{-m45}.
 
 @opindex msoft-float
 @item -msoft-float
 Do not use hardware floating point.
 
 @opindex mac0
-@item -mac0
-Return floating-point results in ac0 (fr0 in Unix assembler syntax).
-
 @opindex mno-ac0
-@item -mno-ac0
-Return floating-point results in memory.  This is the default.
+@item -mac0
+@itemx -mno-ac0
+With @option{-mac0}, return floating-point results in ac0
+(fr0 in Unix assembler syntax).  The default, @option{-mno-ac0}, is
+to return floating-point results in memory.
 
 @opindex m40
+@opindex mno-40
 @item -m40
-Generate code for a PDP-11/40.  Implies -msoft-float -mno-split.
+Generate code for a PDP-11/40.
+Implies @option{-msoft-float} @option{-mno-split}.
 
 @opindex m45
+@opindex mno-45
 @item -m45
 Generate code for a PDP-11/45.  This is the default.
 
 @opindex m10
 @item -m10
-Generate code for a PDP-11/10.  Implies -msoft-float -mno-split.
+Generate code for a PDP-11/10.
+Implies @option{-msoft-float} @option{-mno-split}.
 
 @opindex mint16
 @opindex mno-int32
@@ -31714,8 +31718,9 @@  Use 16-bit @code{int}.  This is the default.
 Use 32-bit @code{int}.
 
 @opindex msplit
+@opindex mno-split
 @item -msplit
-Target has split instruction and data space.  Implies -m45.
+Target has split instruction and data space.  Implies @option{-m45}.
 
 @opindex munix-asm
 @item -munix-asm
@@ -31730,6 +31735,7 @@  Use DEC assembler syntax.
 Use GNU assembler syntax.  This is the default.
 
 @opindex mlra
+@opindex mno-lra
 @item -mlra
 Use the new LRA register allocator.  By default, the old ``reload''
 allocator is used.