diff mbox

[ARM] PR47930 Fix documentation for marm / mthumb

Message ID 4D861AF7.2000903@linaro.org
State Superseded
Headers show

Commit Message

Ramana Radhakrishnan March 20, 2011, 3:19 p.m. UTC
Hi,

	This fixes up documentation for the -marm option and changes the 
behaviour of mthumb to reject the negative options to bring this to 
behave similar to the marm option. The option needs to be documented 
since we now have situations where toolchains default to Thumb state and 
folks need a way of overriding this. I would like a review of this 
before committing it since this is a change to the command line options.

Tested by building a cross toolchain to arm-linux-gnueabi and verified 
that -mno-thumb is rejected and looking up the documentation after it 
was rebuilt.

Ok ?

cheers
Ramana


2011-03-20  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	PR target/47930
	* config/arm/arm.opt (marm): Document it.
	(mthumb): Reject negative variant.

Comments

Richard Earnshaw March 24, 2011, 3:11 p.m. UTC | #1
On Sun, 2011-03-20 at 15:19 +0000, Ramana Radhakrishnan wrote:
> Hi,
> 
> 	This fixes up documentation for the -marm option and changes the 
> behaviour of mthumb to reject the negative options to bring this to 
> behave similar to the marm option. The option needs to be documented 
> since we now have situations where toolchains default to Thumb state and 
> folks need a way of overriding this. I would like a review of this 
> before committing it since this is a change to the command line options.
> 
> Tested by building a cross toolchain to arm-linux-gnueabi and verified 
> that -mno-thumb is rejected and looking up the documentation after it 
> was rebuilt.
> 
> Ok ?
> 
> cheers
> Ramana
> 
> 
> 2011-03-20  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
> 
> 	PR target/47930
> 	* config/arm/arm.opt (marm): Document it.
> 	(mthumb): Reject negative variant.

+@item -marm
+@opindex marm
+Generate code for the 32 bit ARM instruction set. This is used to 
+override and generate code in ARM state if the compiler has been 
+configured to be built in Thumb state.  This option is not passed to
the
+assembler. 

I'd suggest

        @item -mthumb
        @itemx -marm
        @opindex marm
        @opindex mthumb
        
        Select between generating code that executes in ARM and Thumb
        states.  The default for most configurations is to generate code
        that executes in ARM state, but the default can be changed by
        configuring GCC with the @option{--with-mode=}@var{state}
        configure option.
        
I don't see any need to talk about the Thumb1/Thumb2 behaviour here any
more than we do about other ISA variants in ARM state.  Nor do I think
it's relevant to talk about this option in relation to the assembler.

The arm.opt change is OK, but 'Report' should stay; and it should also
be added to the -marm case.

R.
diff mbox

Patch

Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi	(revision 171192)
+++ gcc/doc/invoke.texi	(working copy)
@@ -10109,6 +10109,13 @@ 
 @option{-mno-apcs-reentrant}.
 @end ignore
 
+@item -marm
+@opindex marm
+Generate code for the 32 bit ARM instruction set. This is used to 
+override and generate code in ARM state if the compiler has been 
+configured to be built in Thumb state.  This option is not passed to the
+assembler. 
+
 @item -mthumb-interwork
 @opindex mthumb-interwork
 Generate code which supports calling between the ARM and Thumb
@@ -10354,7 +10361,8 @@ 
 @item -mthumb
 @opindex mthumb
 Generate code for the Thumb instruction set.  The default is to
-use the 32-bit ARM instruction set.
+use the 32-bit ARM instruction set unless the compiler defaults to building
+with Thumb using the @option{--with-mode=thumb} option.
 This option automatically enables either 16-bit Thumb-1 or
 mixed 16/32-bit Thumb-2 instructions based on the @option{-mcpu=@var{name}}
 and @option{-march=@var{name}} options.  This option is not passed to the
Index: gcc/config/arm/arm.opt
===================================================================
--- gcc/config/arm/arm.opt	(revision 171192)
+++ gcc/config/arm/arm.opt	(working copy)
@@ -49,7 +49,8 @@ 
 Specify the name of the target architecture
 
 marm
-Target RejectNegative InverseMask(THUMB) Undocumented
+Target RejectNegative InverseMask(THUMB)
+Generate code in 32 bit ARM state.
 
 mbig-endian
 Target Report RejectNegative Mask(BIG_END)
@@ -130,7 +131,7 @@ 
 Specify the minimum bit alignment of structures
 
 mthumb
-Target Report Mask(THUMB)
+Target RejectNegative Mask(THUMB)
 Compile for the Thumb not the ARM
 
 mthumb-interwork