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.radhakrish...@linaro.org>
PR target/47930
* config/arm/arm.opt (marm): Document it.
(mthumb): Reject negative variant.
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