invoke.texi (AVR Options): Document __AVR_ARCH__.
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 22 Oct 2012 11:13:54 +0000 (11:13 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 22 Oct 2012 11:13:54 +0000 (11:13 +0000)
* doc/invoke.texi (AVR Options): Document __AVR_ARCH__.
Note __AVR_<device>__ is not defined for cores.
Don't point to --help=target.

From-SVN: r192685

gcc/ChangeLog
gcc/doc/invoke.texi

index fbf4e8d2edb4193a60a067347cebb4469ad0226c..c4a0099bb97d20d08b1263ef141ecda77df2085b 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-22  Georg-Johann Lay  <avr@gjlay.de>
+
+       * doc/invoke.texi (AVR Options): Document __AVR_ARCH__.
+       Note __AVR_<device>__ is not defined for cores.
+       Don't point to --help=target.
+
 2012-10-22  Sameera Deshpande  <sameera.deshpande@arm.com>
            Greta Yorsh  <Greta.Yorsh@arm.com>
 
index a66dff1353fd8f540ff20cd2ad47a16263efbaf9..20c4e73904cce22051a8a39589e8e1ca22c58853 100644 (file)
@@ -11247,9 +11247,6 @@ These options are defined for AVR implementations:
 @opindex mmcu
 Specify Atmel AVR instruction set architectures (ISA) or MCU type.
 
-For a complete list of @var{mcu} values that are supported by @command{avr-gcc},
-see the compiler output when called with the @option{--help=target}
-command line option.
 The default for this option is@tie{}@code{avr2}.
 
 GCC supports the following AVR devices and ISAs:
@@ -11540,6 +11537,23 @@ For even more AVR-specific built-in macros see
 
 @table @code
 
+@item __AVR_ARCH__
+Build-in macro that resolves to a decimal number that identifies the
+architecture and depends on the @code{-mmcu=@var{mcu}} option.
+Possible values are:
+
+@code{2}, @code{25}, @code{3}, @code{31}, @code{35},
+@code{4}, @code{5}, @code{51}, @code{6}, @code{102}, @code{104},
+@code{105}, @code{106}, @code{107}
+
+for @var{mcu}=@code{avr2}, @code{avr25}, @code{avr3},
+@code{avr31}, @code{avr35}, @code{avr4}, @code{avr5}, @code{avr51},
+@code{avr6}, @code{avrxmega2}, @code{avrxmega4}, @code{avrxmega5},
+@code{avrxmega6}, @code{avrxmega7}, respectively.
+If @var{mcu} specifies a device, this built-in macro is set
+accordingly. For example, with @code{-mmcu=atmega8} the macro will be
+defined to @code{4}.
+
 @item __AVR_@var{Device}__
 Setting @code{-mmcu=@var{device}} defines this built-in macro which reflects
 the device's name. For example, @code{-mmcu=atmega8} defines the
@@ -11552,6 +11566,9 @@ the device name as from the AVR user manual. The difference between
 @var{Device} in the built-in macro and @var{device} in
 @code{-mmcu=@var{device}} is that the latter is always lowercase.
 
+If @var{device} is not a device but only a core architecture like
+@code{avr51}, this macro will not be defined.
+
 @item __AVR_HAVE_ELPM__
 The device has the the @code{ELPM} instruction.