public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch,avr] Document __AVR_ARCH__
@ 2012-10-18 12:26 Georg-Johann Lay
  2012-10-19  3:05 ` Weddington, Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Georg-Johann Lay @ 2012-10-18 12:26 UTC (permalink / raw)
  To: gcc-patches; +Cc: Denis Chertykov, Eric Weddington

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]

This documents __AVR_ARCH__ built-in macro that was missing up to now.

Pointer to --help=target is removed because the documentation of -mmcu= is
complete.

Ok to apply?

Johann


	* doc/invoke.texi (AVR Options): Document __AVR_ARCH__.
	Note __AVR_<device>__ is not defined for cores.
	Don't point to --help=target.

[-- Attachment #2: avr-arch-doc.diff --]
[-- Type: text/x-patch, Size: 1962 bytes --]

Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi	(revision 192559)
+++ doc/invoke.texi	(working copy)
@@ -11239,9 +11239,6 @@ These options are defined for AVR implem
 @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:
@@ -11532,6 +11529,23 @@ For even more AVR-specific built-in macr
 
 @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
@@ -11544,6 +11558,9 @@ the device name as from the AVR user man
 @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.
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [Patch,avr] Document __AVR_ARCH__
  2012-10-18 12:26 [Patch,avr] Document __AVR_ARCH__ Georg-Johann Lay
@ 2012-10-19  3:05 ` Weddington, Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Weddington, Eric @ 2012-10-19  3:05 UTC (permalink / raw)
  To: Georg-Johann Lay, gcc-patches; +Cc: Denis Chertykov

> -----Original Message-----
> From: Georg-Johann Lay 
> Sent: Thursday, October 18, 2012 5:08 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Denis Chertykov; Weddington, Eric
> Subject: [Patch,avr] Document __AVR_ARCH__
> 
> This documents __AVR_ARCH__ built-in macro that was missing up to now.
> 
> Pointer to --help=target is removed because the documentation of -mmcu= is
> complete.
> 
> Ok to apply?
> 

Approved, please apply! And Thanks!

Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-19  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 12:26 [Patch,avr] Document __AVR_ARCH__ Georg-Johann Lay
2012-10-19  3:05 ` Weddington, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).