]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AVR: ad target/118764 - Let -mcvt set built-in macro __AVR_CVT__
authorGeorg-Johann Lay <avr@gjlay.de>
Sun, 16 Feb 2025 16:20:39 +0000 (17:20 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Sun, 16 Feb 2025 16:32:28 +0000 (17:32 +0100)
gcc/
PR target/118764
* config/avr/avr-c.cc (avr_cpu_cpp_builtins)
[TARGET_CVT]: Define __AVR_CVT__.
* doc/invoke.texi (AVR Built-in Macros): Document __AVR_CVT__.

gcc/config/avr/avr-c.cc
gcc/doc/invoke.texi

index 6f49d3f98a0b64019a0b99a633f8e7e1003a2bf9..9176a49bc44e3d9b6bf8e260731da927ce7b64ec 100644 (file)
@@ -420,6 +420,9 @@ avr_cpu_cpp_builtins (cpp_reader *pfile)
   if (TARGET_RMW)
     cpp_define (pfile, "__AVR_ISA_RMW__");
 
+  if (TARGET_CVT)
+    cpp_define (pfile, "__AVR_CVT__");
+
   cpp_define_formatted (pfile, "__AVR_SFR_OFFSET__=0x%x",
                        avr_arch->sfr_offset);
 
index d1d633beb4bb4f1e8f340ae587c0b550563ae6d2..ca8e468f3f2dbf68c959f74d8fec48c79463504d 100644 (file)
@@ -24468,7 +24468,7 @@ XJMP   exit
 Instead, put @code{main} in section
 @w{@uref{https://avrdudes.github.io/avr-libc/avr-libc-user-manual/mem_sections.html#sec_dot_init,@code{.init9}}}
 so that no call is required.
-By setting this options the user asserts that @code{main} will not return.
+By setting this option the user asserts that @code{main} will not return.
 
 This option can be used for devices with very limited resources in order
 to save a few bytes of code and stack space.  It will work as expected since
@@ -24834,6 +24834,10 @@ is defined to @code{atmega8}.
 If @var{device} is not a device but only a core architecture like
 @samp{avr51}, this macro is not defined.
 
+@item __AVR_CVT__
+The code is being compiled with option @code{-mcvt} to use a
+@emph{compact vector table}.
+
 @item __AVR_XMEGA__
 The device / architecture belongs to the XMEGA family of devices.