public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/sphinx-avr-mmcu)] Convert to RST.
@ 2022-10-20 12:03 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-10-20 12:03 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f73fcba166b3d0fd0667329f2a572f84e49c5812

commit f73fcba166b3d0fd0667329f2a572f84e49c5812
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 19 15:56:00 2022 +0200

    Convert to RST.

Diff:
---
 gcc/Makefile.in                                    |  3 +-
 gcc/config/avr/avr-devices.cc                      | 42 +++++-----
 gcc/config/avr/avr-mcus.def                        |  2 +-
 .../{gen-avr-mmcu-texi.cc => gen-avr-mmcu-rst.cc}  | 33 ++++----
 gcc/config/avr/t-avr                               |  6 +-
 gcc/doc/avr-mmcu.rst                               | 98 ++++++++++++++++++++++
 gcc/doc/avr-mmcu.texi                              | 83 ------------------
 7 files changed, 140 insertions(+), 127 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f672e6ea549..3623af14f57 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -119,6 +119,7 @@ VPATH = @srcdir@
 # This vpath could be extended within the Make-lang fragments.
 
 vpath %.texi $(gcc_docdir)
+vpath %.rst $(gcc_docdir)
 vpath %.texi $(gcc_docdir)/include
 
 # --------
@@ -3332,7 +3333,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi	\
 	 standards.texi invoke.texi extend.texi md.texi objc.texi	\
 	 gcov.texi trouble.texi bugreport.texi service.texi		\
 	 contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi	\
-	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi	\
+	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.rst \
 	 implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \
 	 lto-dump.texi
 
diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index aa284217f50..611b35f7a27 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -64,54 +64,54 @@ avr_arch_types[] =
 };
 
 const avr_arch_info_t
-avr_texinfo[] =
+avr_rst[] =
 {
   { ARCH_AVR1,
     "This ISA is implemented by the minimal AVR core and supported "
     "for assembler only." },
   { ARCH_AVR2,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory." },
+    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR25,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory and with "
-    "the @code{MOVW} instruction." },
+    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory and with "
+    "the ``MOVW`` instruction." },
   { ARCH_AVR3,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR31,
-    "``Classic'' devices with 128@tie{}KiB of program memory." },
+    "\"Classic\" devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR35,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
-    "program memory and with the @code{MOVW} instruction." },
+    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
+    "program memory and with the ``MOVW`` instruction." },
   { ARCH_AVR4,
-    "``Enhanced'' devices with up to 8@tie{}KiB of program memory." },
+    "\"Enhanced\" devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR5,
-    "``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "\"Enhanced\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR51,
-    "``Enhanced'' devices with 128@tie{}KiB of program memory." },
+    "\"Enhanced\" devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR6,
-    "``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB "
+    "\"Enhanced\" devices with 3-byte PC, i.e.: with more than 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRTINY,
-    "``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of "
+    "\"TINY\" Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVRXMEGA2,
-    "``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB "
+    "\"XMEGA\" devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA3,
-    "``XMEGA'' devices with up to 64@tie{}KiB of combined program memory "
+    "\"XMEGA\" devices with up to 64 |nbsp| KiB of combined program memory "
     "and RAM, and with program memory visible in the RAM address space." },
   { ARCH_AVRXMEGA4,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
+    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA5,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
-    "of program memory and more than 64@tie{}KiB of RAM." },
+    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
+    "of program memory and more than 64 |nbsp| KiB of RAM." },
   { ARCH_AVRXMEGA6,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory." },
+    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory." },
   { ARCH_AVRXMEGA7,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory "
-    "and more than 64@tie{}KiB of RAM." }
+    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory "
+    "and more than 64 |nbsp| KiB of RAM." }
 };
 
 const avr_mcu_t
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index fa5e6685227..26c38a5c7aa 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -23,7 +23,7 @@
 
    This will regenerate / update the following source files:
 
-   -  $(srcdir)/doc/avr-mmcu.texi
+   -  $(srcdir)/doc/avr-mmcu.rst
 
    After that, rebuild everything and check-in the new sources to the repo.
    The device list below should be kept in sync with AVR-LibC.
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-rst.cc
similarity index 80%
rename from gcc/config/avr/gen-avr-mmcu-texi.cc
rename to gcc/config/avr/gen-avr-mmcu-rst.cc
index 0e013e90bd0..19b903c2760 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-rst.cc
@@ -137,11 +137,11 @@ print_mcus (size_t n_mcus)
     
   qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator);
 
-  printf ("@*@var{mcu}@tie{}=");
+  printf ("  :samp:`{mcu}=`");
 
   for (i = 0; i < n_mcus; i++)
     {
-      printf (" @code{%s}%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
+      printf (" ``%s``%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
 
       if (i && !strcmp (mcus[i]->name, mcus[i-1]->name))
 	{
@@ -162,20 +162,18 @@ int main (void)
   size_t i, n_mcus = 0;
   const avr_mcu_t *mcu;
 
-  printf ("@c Copyright (C) 2012-2022 Free Software Foundation, Inc.\n");
-  printf ("@c This is part of the GCC manual.\n");
-  printf ("@c For copying conditions, see the file "
-	  "gcc/doc/include/fdl.texi.\n\n");
+  printf ("..\n");
+  printf ("  Copyright 1988-2022 Free Software Foundation, Inc.\n");
+  printf ("  This is part of the GCC manual.\n");
+  printf ("  For copying conditions, see the copyright.rst file.\n\n");
 
-  printf ("@c This file is generated automatically using\n");
-  printf ("@c gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
-  printf ("@c	 gcc/config/avr/avr-arch.h\n");
-  printf ("@c	 gcc/config/avr/avr-devices.cc\n");
-  printf ("@c	 gcc/config/avr/avr-mcus.def\n\n");
+  printf ("  This file is generated automatically using\n");
+  printf ("  gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
+  printf ("    gcc/config/avr/avr-arch.h\n");
+  printf ("    gcc/config/avr/avr-devices.cc\n");
+  printf ("    gcc/config/avr/avr-mcus.def\n\n");
 
-  printf ("@c Please do not edit manually.\n\n");
-
-  printf ("@table @code\n\n");
+  printf ("  Please do not edit manually.\n\n");
 
   for (mcu = avr_mcu_types; mcu->name; mcu++)
     {
@@ -187,9 +185,9 @@ int main (void)
 	  print_mcus (n_mcus);
 	  n_mcus = 0;
 
-	  for (i = 0; i < ARRAY_SIZE (avr_texinfo); i++)
-	    if (arch_id == avr_texinfo[i].arch_id)
-	      printf ("@item %s\n%s\n", mcu->name, avr_texinfo[i].texinfo);
+	  for (i = 0; i < ARRAY_SIZE (avr_rst); i++)
+	    if (arch_id == avr_rst[i].arch_id)
+	      printf ("``%s``\n  %s\n\n", mcu->name, avr_rst[i].texinfo);
 	}
       else if (arch_id == (enum avr_arch_id) mcu->arch_id)
 	{
@@ -198,7 +196,6 @@ int main (void)
     }
 
   print_mcus (n_mcus);
-  printf ("@end table\n");
 
   return EXIT_SUCCESS;
 }
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index d7b1751b3b6..9c5632a8210 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -78,10 +78,10 @@ AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
 
 .PHONY: avr-mcus
 
-avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
+avr-mcus: $(srcdir)/doc/avr-mmcu.rst ; @true
 
 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
-gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
+gen-avr-mmcu-rst$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-rst.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
   $(srcdir)/config/avr/avr-arch.h
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
@@ -91,7 +91,7 @@ gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
   $(srcdir)/config/avr/avr-arch.h $(TM_H)
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
 
-$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
+$(srcdir)/doc/avr-mmcu.rst: gen-avr-mmcu-rst$(build_exeext)
 	$(RUN_GEN) ./$< > $@
 
 s-device-specs: gen-avr-mmcu-specs$(build_exeext)
diff --git a/gcc/doc/avr-mmcu.rst b/gcc/doc/avr-mmcu.rst
new file mode 100644
index 00000000000..120f919e331
--- /dev/null
+++ b/gcc/doc/avr-mmcu.rst
@@ -0,0 +1,98 @@
+..
+  Copyright 1988-2022 Free Software Foundation, Inc.
+  This is part of the GCC manual.
+  For copying conditions, see the copyright.rst file.
+
+  This file is generated automatically using
+  gcc/config/avr/gen-avr-mmcu-texi.cc from:
+    gcc/config/avr/avr-arch.h
+    gcc/config/avr/avr-devices.cc
+    gcc/config/avr/avr-mcus.def
+
+  Please do not edit manually.
+
+``avr2``
+  "Classic" devices with up to 8 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``attiny22``, ``attiny26``, ``at90s2313``, ``at90s2323``, ``at90s2333``, ``at90s2343``, ``at90s4414``, ``at90s4433``, ``at90s4434``, ``at90c8534``, ``at90s8515``, ``at90s8535``.
+
+``avr25``
+  "Classic" devices with up to 8 |nbsp| KiB of program memory and with the ``MOVW`` instruction.
+
+  :samp:`{mcu}=` ``attiny13``, ``attiny13a``, ``attiny24``, ``attiny24a``, ``attiny25``, ``attiny261``, ``attiny261a``, ``attiny2313``, ``attiny2313a``, ``attiny43u``, ``attiny44``, ``attiny44a``, ``attiny45``, ``attiny48``, ``attiny441``, ``attiny461``, ``attiny461a``, ``attiny4313``, ``attiny84``, ``attiny84a``, ``attiny85``, ``attiny87``, ``attiny88``, ``attiny828``, ``attiny841``, ``attiny861``, ``attiny861a``, ``ata5272``, ``ata6616c``, ``at86rf401``.
+
+``avr3``
+  "Classic" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``at76c711``, ``at43usb355``.
+
+``avr31``
+  "Classic" devices with 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega103``, ``at43usb320``.
+
+``avr35``
+  "Classic" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of program memory and with the ``MOVW`` instruction.
+
+  :samp:`{mcu}=` ``attiny167``, ``attiny1634``, ``atmega8u2``, ``atmega16u2``, ``atmega32u2``, ``ata5505``, ``ata6617c``, ``ata664251``, ``at90usb82``, ``at90usb162``.
+
+``avr4``
+  "Enhanced" devices with up to 8 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega48``, ``atmega48a``, ``atmega48p``, ``atmega48pa``, ``atmega48pb``, ``atmega8``, ``atmega8a``, ``atmega8hva``, ``atmega88``, ``atmega88a``, ``atmega88p``, ``atmega88pa``, ``atmega88pb``, ``atmega8515``, ``atmega8535``, ``ata6285``, ``ata6286``, ``ata6289``, ``ata6612c``, ``at90pwm1``, ``at90pwm2``, ``at90pwm2b``, ``at90pwm3``, ``at90pwm3b``, ``at90pwm81``.
+
+``avr5``
+  "Enhanced" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega16``, ``atmega16a``, ``atmega16hva``, ``atmega16hva2``, ``atmega16hvb``, ``atmega16hvbrevb``, ``atmega16m1``, ``atmega16u4``, ``atmega161``, ``atmega162``, ``atmega163``, ``atmega164a``, ``atmega164p``, ``atmega164pa``, ``atmega165``, ``atmega165a``, ``atmega165p``, ``atmega165pa``, ``atmega168``, ``atmega168a``, ``atmega168p``, ``atmega168pa``, ``atmega168pb``, ``atmega169``, ``atmega169a``, ``atmega169p``, ``atmega169pa``, ``atmega32``, ``atmega32a``, ``atmega32c1``, ``atmega32hvb``, ``atmega32hvbrevb``, ``atmega32m1``, ``atmega32u4``, ``atmega32u6``, ``atmega323``, ``atmega324a``, ``atmega324p``, ``atmega324pa``, ``atmega324pb``, ``atmega325``, ``atmega325a``, ``atmega325p``, ``atmega325pa``, ``atmega328``, ``atmega328p``, ``atmega328pb``, ``atmega329``, ``atmega329a``, ``atmega329p``, ``atmega329pa``, ``atmega3250``, ``atmega3250a``, ``atmega3250p``, ``atmega3250pa``, ``atmega3290``, ``atmega3290a``, ``atmega3290p``, ``atmega3290pa``, ``atmega406``, ``atmega64``, ``atmega64a``, ``atmega64c1``, ``atmega64hve``, ``atmega64hve2``, ``atmega64m1``, ``atmega64rfr2``, ``atmega640``, ``atmega644``, ``atmega644a``, ``atmega644p``, ``atmega644pa``, ``atmega644rfr2``, ``atmega645``, ``atmega645a``, ``atmega645p``, ``atmega649``, ``atmega649a``, ``atmega649p``, ``atmega6450``, ``atmega6450a``, ``atmega6450p``, ``atmega6490``, ``atmega6490a``, ``atmega6490p``, ``ata5795``, ``ata5790``, ``ata5790n``, ``ata5791``, ``ata6613c``, ``ata6614q``, ``ata5782``, ``ata5831``, ``ata8210``, ``ata8510``, ``ata5702m322``, ``at90pwm161``, ``at90pwm216``, ``at90pwm316``, ``at90can32``, ``at90can64``, ``at90scr100``, ``at90usb646``, ``at90usb647``, ``at94k``, ``m3000``.
+
+``avr51``
+  "Enhanced" devices with 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega128``, ``atmega128a``, ``atmega128rfa1``, ``atmega128rfr2``, ``atmega1280``, ``atmega1281``, ``atmega1284``, ``atmega1284p``, ``atmega1284rfr2``, ``at90can128``, ``at90usb1286``, ``at90usb1287``.
+
+``avr6``
+  "Enhanced" devices with 3-byte PC, i.e.: with more than 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega256rfr2``, ``atmega2560``, ``atmega2561``, ``atmega2564rfr2``.
+
+``avrxmega2``
+  "XMEGA" devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atxmega8e5``, ``atxmega16a4``, ``atxmega16a4u``, ``atxmega16c4``, ``atxmega16d4``, ``atxmega16e5``, ``atxmega32a4``, ``atxmega32a4u``, ``atxmega32c3``, ``atxmega32c4``, ``atxmega32d3``, ``atxmega32d4``, ``atxmega32e5``, ``avr64da28``, ``avr64da32``, ``avr64da48``, ``avr64da64``, ``avr64db28``, ``avr64db32``, ``avr64db48``, ``avr64db64``.
+
+``avrxmega3``
+  "XMEGA" devices with up to 64 |nbsp| KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
+
+  :samp:`{mcu}=` ``attiny202``, ``attiny204``, ``attiny212``, ``attiny214``, ``attiny402``, ``attiny404``, ``attiny406``, ``attiny412``, ``attiny414``, ``attiny416``, ``attiny417``, ``attiny804``, ``attiny806``, ``attiny807``, ``attiny814``, ``attiny816``, ``attiny817``, ``attiny1604``, ``attiny1606``, ``attiny1607``, ``attiny1614``, ``attiny1616``, ``attiny1617``, ``attiny3214``, ``attiny3216``, ``attiny3217``, ``atmega808``, ``atmega809``, ``atmega1608``, ``atmega1609``, ``atmega3208``, ``atmega3209``, ``atmega4808``, ``atmega4809``, ``avr32da28``, ``avr32da32``, ``avr32da48``, ``avr32db28``, ``avr32db32``, ``avr32db48``.
+
+``avrxmega4``
+  "XMEGA" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atxmega64a3``, ``atxmega64a3u``, ``atxmega64a4u``, ``atxmega64b1``, ``atxmega64b3``, ``atxmega64c3``, ``atxmega64d3``, ``atxmega64d4``, ``avr128da28``, ``avr128da32``, ``avr128da48``, ``avr128da64``, ``avr128db28``, ``avr128db32``, ``avr128db48``, ``avr128db64``.
+
+``avrxmega5``
+  "XMEGA" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB of program memory and more than 64 |nbsp| KiB of RAM.
+
+  :samp:`{mcu}=` ``atxmega64a1``, ``atxmega64a1u``.
+
+``avrxmega6``
+  "XMEGA" devices with more than 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atxmega128a3``, ``atxmega128a3u``, ``atxmega128b1``, ``atxmega128b3``, ``atxmega128c3``, ``atxmega128d3``, ``atxmega128d4``, ``atxmega192a3``, ``atxmega192a3u``, ``atxmega192c3``, ``atxmega192d3``, ``atxmega256a3``, ``atxmega256a3b``, ``atxmega256a3bu``, ``atxmega256a3u``, ``atxmega256c3``, ``atxmega256d3``, ``atxmega384c3``, ``atxmega384d3``.
+
+``avrxmega7``
+  "XMEGA" devices with more than 128 |nbsp| KiB of program memory and more than 64 |nbsp| KiB of RAM.
+
+  :samp:`{mcu}=` ``atxmega128a1``, ``atxmega128a1u``, ``atxmega128a4u``.
+
+``avrtiny``
+  "TINY" Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``attiny4``, ``attiny5``, ``attiny9``, ``attiny10``, ``attiny20``, ``attiny40``.
+
+``avr1``
+  This ISA is implemented by the minimal AVR core and supported for assembler only.
+
+  :samp:`{mcu}=` ``attiny11``, ``attiny12``, ``attiny15``, ``attiny28``, ``at90s1200``.
+
diff --git a/gcc/doc/avr-mmcu.texi b/gcc/doc/avr-mmcu.texi
deleted file mode 100644
index c3e9817928a..00000000000
--- a/gcc/doc/avr-mmcu.texi
+++ /dev/null
@@ -1,83 +0,0 @@
-@c Copyright (C) 2012-2022 Free Software Foundation, Inc.
-@c This is part of the GCC manual.
-@c For copying conditions, see the file gcc/doc/include/fdl.texi.
-
-@c This file is generated automatically using
-@c gcc/config/avr/gen-avr-mmcu-texi.cc from:
-@c	 gcc/config/avr/avr-arch.h
-@c	 gcc/config/avr/avr-devices.cc
-@c	 gcc/config/avr/avr-mcus.def
-
-@c Please do not edit manually.
-
-@table @code
-
-@item avr2
-``Classic'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{attiny22}, @code{attiny26}, @code{at90s2313}, @code{at90s2323}, @code{at90s2333}, @code{at90s2343}, @code{at90s4414}, @code{at90s4433}, @code{at90s4434}, @code{at90c8534}, @code{at90s8515}, @code{at90s8535}.
-
-@item avr25
-``Classic'' devices with up to 8@tie{}KiB of program memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{attiny13}, @code{attiny13a}, @code{attiny24}, @code{attiny24a}, @code{attiny25}, @code{attiny261}, @code{attiny261a}, @code{attiny2313}, @code{attiny2313a}, @code{attiny43u}, @code{attiny44}, @code{attiny44a}, @code{attiny45}, @code{attiny48}, @code{attiny441}, @code{attiny461}, @code{attiny461a}, @code{attiny4313}, @code{attiny84}, @code{attiny84a}, @code{attiny85}, @code{attiny87}, @code{attiny88}, @code{attiny828}, @code{attiny841}, @code{attiny861}, @code{attiny861a}, @code{ata5272}, @code{ata6616c}, @code{at86rf401}.
-
-@item avr3
-``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at76c711}, @code{at43usb355}.
-
-@item avr31
-``Classic'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega103}, @code{at43usb320}.
-
-@item avr35
-``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{attiny167}, @code{attiny1634}, @code{atmega8u2}, @code{atmega16u2}, @code{atmega32u2}, @code{ata5505}, @code{ata6617c}, @code{ata664251}, @code{at90usb82}, @code{at90usb162}.
-
-@item avr4
-``Enhanced'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega48}, @code{atmega48a}, @code{atmega48p}, @code{atmega48pa}, @code{atmega48pb}, @code{atmega8}, @code{atmega8a}, @code{atmega8hva}, @code{atmega88}, @code{atmega88a}, @code{atmega88p}, @code{atmega88pa}, @code{atmega88pb}, @code{atmega8515}, @code{atmega8535}, @code{ata6285}, @code{ata6286}, @code{ata6289}, @code{ata6612c}, @code{at90pwm1}, @code{at90pwm2}, @code{at90pwm2b}, @code{at90pwm3}, @code{at90pwm3b}, @code{at90pwm81}.
-
-@item avr5
-``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega16}, @code{atmega16a}, @code{atmega16hva}, @code{atmega16hva2}, @code{atmega16hvb}, @code{atmega16hvbrevb}, @code{atmega16m1}, @code{atmega16u4}, @code{atmega161}, @code{atmega162}, @code{atmega163}, @code{atmega164a}, @code{atmega164p}, @code{atmega164pa}, @code{atmega165}, @code{atmega165a}, @code{atmega165p}, @code{atmega165pa}, @code{atmega168}, @code{atmega168a}, @code{atmega168p}, @code{atmega168pa}, @code{atmega168pb}, @code{atmega169}, @code{atmega169a}, @code{atmega169p}, @code{atmega169pa}, @code{atmega32}, @code{atmega32a}, @code{atmega32c1}, @code{atmega32hvb}, @code{atmega32hvbrevb}, @code{atmega32m1}, @code{atmega32u4}, @code{atmega32u6}, @code{atmega323}, @code{atmega324a}, @code{atmega324p}, @code{atmega324pa}, @code{atmega324pb}, @code{atmega325}, @code{atmega325a}, @code{atmega325p}, @code{atmega325pa}, @code{atmega328}, @code{atmega328p}, @code{atmega328pb}, @code{atmega329}, @code{atmega329a}, @code{atmega329p}, @code{atmega329pa}, @code{atmega3250}, @code{atmega3250a}, @code{atmega3250p}, @code{atmega3250pa}, @code{atmega3290}, @code{atmega3290a}, @code{atmega3290p}, @code{atmega3290pa}, @code{atmega406}, @code{atmega64}, @code{atmega64a}, @code{atmega64c1}, @code{atmega64hve}, @code{atmega64hve2}, @code{atmega64m1}, @code{atmega64rfr2}, @code{atmega640}, @code{atmega644}, @code{atmega644a}, @code{atmega644p}, @code{atmega644pa}, @code{atmega644rfr2}, @code{atmega645}, @code{atmega645a}, @code{atmega645p}, @code{atmega649}, @code{atmega649a}, @code{atmega649p}, @code{atmega6450}, @code{atmega6450a}, @code{atmega6450p}, @code{atmega6490}, @code{atmega6490a}, @code{atmega6490p}, @code{ata5795}, @code{ata5790}, @code{ata5790n}, @code{ata5791}, @code{ata6613c}, @code{ata6614q}, @code{ata5782}, @code{ata5831}, @code{ata8210}, @code{ata8510}, @code{ata5702m322}, @code{at90pwm161}, @code{at90pwm216}, @code{at90pwm316}, @code{at90can32}, @code{at90can64}, @code{at90scr100}, @code{at90usb646}, @code{at90usb647}, @code{at94k}, @code{m3000}.
-
-@item avr51
-``Enhanced'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega128}, @code{atmega128a}, @code{atmega128rfa1}, @code{atmega128rfr2}, @code{atmega1280}, @code{atmega1281}, @code{atmega1284}, @code{atmega1284p}, @code{atmega1284rfr2}, @code{at90can128}, @code{at90usb1286}, @code{at90usb1287}.
-
-@item avr6
-``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega256rfr2}, @code{atmega2560}, @code{atmega2561}, @code{atmega2564rfr2}.
-
-@item avrxmega2
-``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega8e5}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16e5}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c3}, @code{atxmega32c4}, @code{atxmega32d3}, @code{atxmega32d4}, @code{atxmega32e5}, @code{avr64da28}, @code{avr64da32}, @code{avr64da48}, @code{avr64da64}, @code{avr64db28}, @code{avr64db32}, @code{avr64db48}, @code{avr64db64}.
-
-@item avrxmega3
-``XMEGA'' devices with up to 64@tie{}KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
-@*@var{mcu}@tie{}= @code{attiny202}, @code{attiny204}, @code{attiny212}, @code{attiny214}, @code{attiny402}, @code{attiny404}, @code{attiny406}, @code{attiny412}, @code{attiny414}, @code{attiny416}, @code{attiny417}, @code{attiny804}, @code{attiny806}, @code{attiny807}, @code{attiny814}, @code{attiny816}, @code{attiny817}, @code{attiny1604}, @code{attiny1606}, @code{attiny1607}, @code{attiny1614}, @code{attiny1616}, @code{attiny1617}, @code{attiny3214}, @code{attiny3216}, @code{attiny3217}, @code{atmega808}, @code{atmega809}, @code{atmega1608}, @code{atmega1609}, @code{atmega3208}, @code{atmega3209}, @code{atmega4808}, @code{atmega4809}, @code{avr32da28}, @code{avr32da32}, @code{avr32da48}, @code{avr32db28}, @code{avr32db32}, @code{avr32db48}.
-
-@item avrxmega4
-``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega64a3}, @code{atxmega64a3u}, @code{atxmega64a4u}, @code{atxmega64b1}, @code{atxmega64b3}, @code{atxmega64c3}, @code{atxmega64d3}, @code{atxmega64d4}, @code{avr128da28}, @code{avr128da32}, @code{avr128da48}, @code{avr128da64}, @code{avr128db28}, @code{avr128db32}, @code{avr128db48}, @code{avr128db64}.
-
-@item avrxmega5
-``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
-@*@var{mcu}@tie{}= @code{atxmega64a1}, @code{atxmega64a1u}.
-
-@item avrxmega6
-``XMEGA'' devices with more than 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega128a3}, @code{atxmega128a3u}, @code{atxmega128b1}, @code{atxmega128b3}, @code{atxmega128c3}, @code{atxmega128d3}, @code{atxmega128d4}, @code{atxmega192a3}, @code{atxmega192a3u}, @code{atxmega192c3}, @code{atxmega192d3}, @code{atxmega256a3}, @code{atxmega256a3b}, @code{atxmega256a3bu}, @code{atxmega256a3u}, @code{atxmega256c3}, @code{atxmega256d3}, @code{atxmega384c3}, @code{atxmega384d3}.
-
-@item avrxmega7
-``XMEGA'' devices with more than 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
-@*@var{mcu}@tie{}= @code{atxmega128a1}, @code{atxmega128a1u}, @code{atxmega128a4u}.
-
-@item avrtiny
-``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{attiny4}, @code{attiny5}, @code{attiny9}, @code{attiny10}, @code{attiny20}, @code{attiny40}.
-
-@item avr1
-This ISA is implemented by the minimal AVR core and supported for assembler only.
-@*@var{mcu}@tie{}= @code{attiny11}, @code{attiny12}, @code{attiny15}, @code{attiny28}, @code{at90s1200}.
-
-@end table

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

* [gcc(refs/users/marxin/heads/sphinx-avr-mmcu)] Convert to RST.
@ 2022-10-20 11:47 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-10-20 11:47 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7d491afc82bc683f195bd905588f2fc36332411e

commit 7d491afc82bc683f195bd905588f2fc36332411e
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 19 15:56:00 2022 +0200

    Convert to RST.

Diff:
---
 gcc/Makefile.in                                    |  2 +-
 gcc/config/avr/avr-devices.cc                      | 42 +++++-----
 gcc/config/avr/avr-mcus.def                        |  2 +-
 .../{gen-avr-mmcu-texi.cc => gen-avr-mmcu-rst.cc}  | 33 ++++----
 gcc/config/avr/t-avr                               |  6 +-
 gcc/doc/avr-mmcu.rst                               | 98 ++++++++++++++++++++++
 gcc/doc/avr-mmcu.texi                              | 83 ------------------
 7 files changed, 139 insertions(+), 127 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f672e6ea549..daebf18b253 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3332,7 +3332,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi	\
 	 standards.texi invoke.texi extend.texi md.texi objc.texi	\
 	 gcov.texi trouble.texi bugreport.texi service.texi		\
 	 contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi	\
-	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi	\
+	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.rst \
 	 implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \
 	 lto-dump.texi
 
diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index aa284217f50..611b35f7a27 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -64,54 +64,54 @@ avr_arch_types[] =
 };
 
 const avr_arch_info_t
-avr_texinfo[] =
+avr_rst[] =
 {
   { ARCH_AVR1,
     "This ISA is implemented by the minimal AVR core and supported "
     "for assembler only." },
   { ARCH_AVR2,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory." },
+    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR25,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory and with "
-    "the @code{MOVW} instruction." },
+    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory and with "
+    "the ``MOVW`` instruction." },
   { ARCH_AVR3,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR31,
-    "``Classic'' devices with 128@tie{}KiB of program memory." },
+    "\"Classic\" devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR35,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
-    "program memory and with the @code{MOVW} instruction." },
+    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
+    "program memory and with the ``MOVW`` instruction." },
   { ARCH_AVR4,
-    "``Enhanced'' devices with up to 8@tie{}KiB of program memory." },
+    "\"Enhanced\" devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR5,
-    "``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "\"Enhanced\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR51,
-    "``Enhanced'' devices with 128@tie{}KiB of program memory." },
+    "\"Enhanced\" devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR6,
-    "``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB "
+    "\"Enhanced\" devices with 3-byte PC, i.e.: with more than 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRTINY,
-    "``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of "
+    "\"TINY\" Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVRXMEGA2,
-    "``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB "
+    "\"XMEGA\" devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA3,
-    "``XMEGA'' devices with up to 64@tie{}KiB of combined program memory "
+    "\"XMEGA\" devices with up to 64 |nbsp| KiB of combined program memory "
     "and RAM, and with program memory visible in the RAM address space." },
   { ARCH_AVRXMEGA4,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
+    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA5,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
-    "of program memory and more than 64@tie{}KiB of RAM." },
+    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
+    "of program memory and more than 64 |nbsp| KiB of RAM." },
   { ARCH_AVRXMEGA6,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory." },
+    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory." },
   { ARCH_AVRXMEGA7,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory "
-    "and more than 64@tie{}KiB of RAM." }
+    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory "
+    "and more than 64 |nbsp| KiB of RAM." }
 };
 
 const avr_mcu_t
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index fa5e6685227..26c38a5c7aa 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -23,7 +23,7 @@
 
    This will regenerate / update the following source files:
 
-   -  $(srcdir)/doc/avr-mmcu.texi
+   -  $(srcdir)/doc/avr-mmcu.rst
 
    After that, rebuild everything and check-in the new sources to the repo.
    The device list below should be kept in sync with AVR-LibC.
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-rst.cc
similarity index 80%
rename from gcc/config/avr/gen-avr-mmcu-texi.cc
rename to gcc/config/avr/gen-avr-mmcu-rst.cc
index 0e013e90bd0..19b903c2760 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-rst.cc
@@ -137,11 +137,11 @@ print_mcus (size_t n_mcus)
     
   qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator);
 
-  printf ("@*@var{mcu}@tie{}=");
+  printf ("  :samp:`{mcu}=`");
 
   for (i = 0; i < n_mcus; i++)
     {
-      printf (" @code{%s}%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
+      printf (" ``%s``%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
 
       if (i && !strcmp (mcus[i]->name, mcus[i-1]->name))
 	{
@@ -162,20 +162,18 @@ int main (void)
   size_t i, n_mcus = 0;
   const avr_mcu_t *mcu;
 
-  printf ("@c Copyright (C) 2012-2022 Free Software Foundation, Inc.\n");
-  printf ("@c This is part of the GCC manual.\n");
-  printf ("@c For copying conditions, see the file "
-	  "gcc/doc/include/fdl.texi.\n\n");
+  printf ("..\n");
+  printf ("  Copyright 1988-2022 Free Software Foundation, Inc.\n");
+  printf ("  This is part of the GCC manual.\n");
+  printf ("  For copying conditions, see the copyright.rst file.\n\n");
 
-  printf ("@c This file is generated automatically using\n");
-  printf ("@c gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
-  printf ("@c	 gcc/config/avr/avr-arch.h\n");
-  printf ("@c	 gcc/config/avr/avr-devices.cc\n");
-  printf ("@c	 gcc/config/avr/avr-mcus.def\n\n");
+  printf ("  This file is generated automatically using\n");
+  printf ("  gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
+  printf ("    gcc/config/avr/avr-arch.h\n");
+  printf ("    gcc/config/avr/avr-devices.cc\n");
+  printf ("    gcc/config/avr/avr-mcus.def\n\n");
 
-  printf ("@c Please do not edit manually.\n\n");
-
-  printf ("@table @code\n\n");
+  printf ("  Please do not edit manually.\n\n");
 
   for (mcu = avr_mcu_types; mcu->name; mcu++)
     {
@@ -187,9 +185,9 @@ int main (void)
 	  print_mcus (n_mcus);
 	  n_mcus = 0;
 
-	  for (i = 0; i < ARRAY_SIZE (avr_texinfo); i++)
-	    if (arch_id == avr_texinfo[i].arch_id)
-	      printf ("@item %s\n%s\n", mcu->name, avr_texinfo[i].texinfo);
+	  for (i = 0; i < ARRAY_SIZE (avr_rst); i++)
+	    if (arch_id == avr_rst[i].arch_id)
+	      printf ("``%s``\n  %s\n\n", mcu->name, avr_rst[i].texinfo);
 	}
       else if (arch_id == (enum avr_arch_id) mcu->arch_id)
 	{
@@ -198,7 +196,6 @@ int main (void)
     }
 
   print_mcus (n_mcus);
-  printf ("@end table\n");
 
   return EXIT_SUCCESS;
 }
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index d7b1751b3b6..9c5632a8210 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -78,10 +78,10 @@ AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
 
 .PHONY: avr-mcus
 
-avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
+avr-mcus: $(srcdir)/doc/avr-mmcu.rst ; @true
 
 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
-gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
+gen-avr-mmcu-rst$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-rst.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
   $(srcdir)/config/avr/avr-arch.h
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
@@ -91,7 +91,7 @@ gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
   $(srcdir)/config/avr/avr-arch.h $(TM_H)
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
 
-$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
+$(srcdir)/doc/avr-mmcu.rst: gen-avr-mmcu-rst$(build_exeext)
 	$(RUN_GEN) ./$< > $@
 
 s-device-specs: gen-avr-mmcu-specs$(build_exeext)
diff --git a/gcc/doc/avr-mmcu.rst b/gcc/doc/avr-mmcu.rst
new file mode 100644
index 00000000000..120f919e331
--- /dev/null
+++ b/gcc/doc/avr-mmcu.rst
@@ -0,0 +1,98 @@
+..
+  Copyright 1988-2022 Free Software Foundation, Inc.
+  This is part of the GCC manual.
+  For copying conditions, see the copyright.rst file.
+
+  This file is generated automatically using
+  gcc/config/avr/gen-avr-mmcu-texi.cc from:
+    gcc/config/avr/avr-arch.h
+    gcc/config/avr/avr-devices.cc
+    gcc/config/avr/avr-mcus.def
+
+  Please do not edit manually.
+
+``avr2``
+  "Classic" devices with up to 8 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``attiny22``, ``attiny26``, ``at90s2313``, ``at90s2323``, ``at90s2333``, ``at90s2343``, ``at90s4414``, ``at90s4433``, ``at90s4434``, ``at90c8534``, ``at90s8515``, ``at90s8535``.
+
+``avr25``
+  "Classic" devices with up to 8 |nbsp| KiB of program memory and with the ``MOVW`` instruction.
+
+  :samp:`{mcu}=` ``attiny13``, ``attiny13a``, ``attiny24``, ``attiny24a``, ``attiny25``, ``attiny261``, ``attiny261a``, ``attiny2313``, ``attiny2313a``, ``attiny43u``, ``attiny44``, ``attiny44a``, ``attiny45``, ``attiny48``, ``attiny441``, ``attiny461``, ``attiny461a``, ``attiny4313``, ``attiny84``, ``attiny84a``, ``attiny85``, ``attiny87``, ``attiny88``, ``attiny828``, ``attiny841``, ``attiny861``, ``attiny861a``, ``ata5272``, ``ata6616c``, ``at86rf401``.
+
+``avr3``
+  "Classic" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``at76c711``, ``at43usb355``.
+
+``avr31``
+  "Classic" devices with 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega103``, ``at43usb320``.
+
+``avr35``
+  "Classic" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of program memory and with the ``MOVW`` instruction.
+
+  :samp:`{mcu}=` ``attiny167``, ``attiny1634``, ``atmega8u2``, ``atmega16u2``, ``atmega32u2``, ``ata5505``, ``ata6617c``, ``ata664251``, ``at90usb82``, ``at90usb162``.
+
+``avr4``
+  "Enhanced" devices with up to 8 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega48``, ``atmega48a``, ``atmega48p``, ``atmega48pa``, ``atmega48pb``, ``atmega8``, ``atmega8a``, ``atmega8hva``, ``atmega88``, ``atmega88a``, ``atmega88p``, ``atmega88pa``, ``atmega88pb``, ``atmega8515``, ``atmega8535``, ``ata6285``, ``ata6286``, ``ata6289``, ``ata6612c``, ``at90pwm1``, ``at90pwm2``, ``at90pwm2b``, ``at90pwm3``, ``at90pwm3b``, ``at90pwm81``.
+
+``avr5``
+  "Enhanced" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega16``, ``atmega16a``, ``atmega16hva``, ``atmega16hva2``, ``atmega16hvb``, ``atmega16hvbrevb``, ``atmega16m1``, ``atmega16u4``, ``atmega161``, ``atmega162``, ``atmega163``, ``atmega164a``, ``atmega164p``, ``atmega164pa``, ``atmega165``, ``atmega165a``, ``atmega165p``, ``atmega165pa``, ``atmega168``, ``atmega168a``, ``atmega168p``, ``atmega168pa``, ``atmega168pb``, ``atmega169``, ``atmega169a``, ``atmega169p``, ``atmega169pa``, ``atmega32``, ``atmega32a``, ``atmega32c1``, ``atmega32hvb``, ``atmega32hvbrevb``, ``atmega32m1``, ``atmega32u4``, ``atmega32u6``, ``atmega323``, ``atmega324a``, ``atmega324p``, ``atmega324pa``, ``atmega324pb``, ``atmega325``, ``atmega325a``, ``atmega325p``, ``atmega325pa``, ``atmega328``, ``atmega328p``, ``atmega328pb``, ``atmega329``, ``atmega329a``, ``atmega329p``, ``atmega329pa``, ``atmega3250``, ``atmega3250a``, ``atmega3250p``, ``atmega3250pa``, ``atmega3290``, ``atmega3290a``, ``atmega3290p``, ``atmega3290pa``, ``atmega406``, ``atmega64``, ``atmega64a``, ``atmega64c1``, ``atmega64hve``, ``atmega64hve2``, ``atmega64m1``, ``atmega64rfr2``, ``atmega640``, ``atmega644``, ``atmega644a``, ``atmega644p``, ``atmega644pa``, ``atmega644rfr2``, ``atmega645``, ``atmega645a``, ``atmega645p``, ``atmega649``, ``atmega649a``, ``atmega649p``, ``atmega6450``, ``atmega6450a``, ``atmega6450p``, ``atmega6490``, ``atmega6490a``, ``atmega6490p``, ``ata5795``, ``ata5790``, ``ata5790n``, ``ata5791``, ``ata6613c``, ``ata6614q``, ``ata5782``, ``ata5831``, ``ata8210``, ``ata8510``, ``ata5702m322``, ``at90pwm161``, ``at90pwm216``, ``at90pwm316``, ``at90can32``, ``at90can64``, ``at90scr100``, ``at90usb646``, ``at90usb647``, ``at94k``, ``m3000``.
+
+``avr51``
+  "Enhanced" devices with 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega128``, ``atmega128a``, ``atmega128rfa1``, ``atmega128rfr2``, ``atmega1280``, ``atmega1281``, ``atmega1284``, ``atmega1284p``, ``atmega1284rfr2``, ``at90can128``, ``at90usb1286``, ``at90usb1287``.
+
+``avr6``
+  "Enhanced" devices with 3-byte PC, i.e.: with more than 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atmega256rfr2``, ``atmega2560``, ``atmega2561``, ``atmega2564rfr2``.
+
+``avrxmega2``
+  "XMEGA" devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atxmega8e5``, ``atxmega16a4``, ``atxmega16a4u``, ``atxmega16c4``, ``atxmega16d4``, ``atxmega16e5``, ``atxmega32a4``, ``atxmega32a4u``, ``atxmega32c3``, ``atxmega32c4``, ``atxmega32d3``, ``atxmega32d4``, ``atxmega32e5``, ``avr64da28``, ``avr64da32``, ``avr64da48``, ``avr64da64``, ``avr64db28``, ``avr64db32``, ``avr64db48``, ``avr64db64``.
+
+``avrxmega3``
+  "XMEGA" devices with up to 64 |nbsp| KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
+
+  :samp:`{mcu}=` ``attiny202``, ``attiny204``, ``attiny212``, ``attiny214``, ``attiny402``, ``attiny404``, ``attiny406``, ``attiny412``, ``attiny414``, ``attiny416``, ``attiny417``, ``attiny804``, ``attiny806``, ``attiny807``, ``attiny814``, ``attiny816``, ``attiny817``, ``attiny1604``, ``attiny1606``, ``attiny1607``, ``attiny1614``, ``attiny1616``, ``attiny1617``, ``attiny3214``, ``attiny3216``, ``attiny3217``, ``atmega808``, ``atmega809``, ``atmega1608``, ``atmega1609``, ``atmega3208``, ``atmega3209``, ``atmega4808``, ``atmega4809``, ``avr32da28``, ``avr32da32``, ``avr32da48``, ``avr32db28``, ``avr32db32``, ``avr32db48``.
+
+``avrxmega4``
+  "XMEGA" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atxmega64a3``, ``atxmega64a3u``, ``atxmega64a4u``, ``atxmega64b1``, ``atxmega64b3``, ``atxmega64c3``, ``atxmega64d3``, ``atxmega64d4``, ``avr128da28``, ``avr128da32``, ``avr128da48``, ``avr128da64``, ``avr128db28``, ``avr128db32``, ``avr128db48``, ``avr128db64``.
+
+``avrxmega5``
+  "XMEGA" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB of program memory and more than 64 |nbsp| KiB of RAM.
+
+  :samp:`{mcu}=` ``atxmega64a1``, ``atxmega64a1u``.
+
+``avrxmega6``
+  "XMEGA" devices with more than 128 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``atxmega128a3``, ``atxmega128a3u``, ``atxmega128b1``, ``atxmega128b3``, ``atxmega128c3``, ``atxmega128d3``, ``atxmega128d4``, ``atxmega192a3``, ``atxmega192a3u``, ``atxmega192c3``, ``atxmega192d3``, ``atxmega256a3``, ``atxmega256a3b``, ``atxmega256a3bu``, ``atxmega256a3u``, ``atxmega256c3``, ``atxmega256d3``, ``atxmega384c3``, ``atxmega384d3``.
+
+``avrxmega7``
+  "XMEGA" devices with more than 128 |nbsp| KiB of program memory and more than 64 |nbsp| KiB of RAM.
+
+  :samp:`{mcu}=` ``atxmega128a1``, ``atxmega128a1u``, ``atxmega128a4u``.
+
+``avrtiny``
+  "TINY" Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of program memory.
+
+  :samp:`{mcu}=` ``attiny4``, ``attiny5``, ``attiny9``, ``attiny10``, ``attiny20``, ``attiny40``.
+
+``avr1``
+  This ISA is implemented by the minimal AVR core and supported for assembler only.
+
+  :samp:`{mcu}=` ``attiny11``, ``attiny12``, ``attiny15``, ``attiny28``, ``at90s1200``.
+
diff --git a/gcc/doc/avr-mmcu.texi b/gcc/doc/avr-mmcu.texi
deleted file mode 100644
index c3e9817928a..00000000000
--- a/gcc/doc/avr-mmcu.texi
+++ /dev/null
@@ -1,83 +0,0 @@
-@c Copyright (C) 2012-2022 Free Software Foundation, Inc.
-@c This is part of the GCC manual.
-@c For copying conditions, see the file gcc/doc/include/fdl.texi.
-
-@c This file is generated automatically using
-@c gcc/config/avr/gen-avr-mmcu-texi.cc from:
-@c	 gcc/config/avr/avr-arch.h
-@c	 gcc/config/avr/avr-devices.cc
-@c	 gcc/config/avr/avr-mcus.def
-
-@c Please do not edit manually.
-
-@table @code
-
-@item avr2
-``Classic'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{attiny22}, @code{attiny26}, @code{at90s2313}, @code{at90s2323}, @code{at90s2333}, @code{at90s2343}, @code{at90s4414}, @code{at90s4433}, @code{at90s4434}, @code{at90c8534}, @code{at90s8515}, @code{at90s8535}.
-
-@item avr25
-``Classic'' devices with up to 8@tie{}KiB of program memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{attiny13}, @code{attiny13a}, @code{attiny24}, @code{attiny24a}, @code{attiny25}, @code{attiny261}, @code{attiny261a}, @code{attiny2313}, @code{attiny2313a}, @code{attiny43u}, @code{attiny44}, @code{attiny44a}, @code{attiny45}, @code{attiny48}, @code{attiny441}, @code{attiny461}, @code{attiny461a}, @code{attiny4313}, @code{attiny84}, @code{attiny84a}, @code{attiny85}, @code{attiny87}, @code{attiny88}, @code{attiny828}, @code{attiny841}, @code{attiny861}, @code{attiny861a}, @code{ata5272}, @code{ata6616c}, @code{at86rf401}.
-
-@item avr3
-``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{at76c711}, @code{at43usb355}.
-
-@item avr31
-``Classic'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega103}, @code{at43usb320}.
-
-@item avr35
-``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory and with the @code{MOVW} instruction.
-@*@var{mcu}@tie{}= @code{attiny167}, @code{attiny1634}, @code{atmega8u2}, @code{atmega16u2}, @code{atmega32u2}, @code{ata5505}, @code{ata6617c}, @code{ata664251}, @code{at90usb82}, @code{at90usb162}.
-
-@item avr4
-``Enhanced'' devices with up to 8@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega48}, @code{atmega48a}, @code{atmega48p}, @code{atmega48pa}, @code{atmega48pb}, @code{atmega8}, @code{atmega8a}, @code{atmega8hva}, @code{atmega88}, @code{atmega88a}, @code{atmega88p}, @code{atmega88pa}, @code{atmega88pb}, @code{atmega8515}, @code{atmega8535}, @code{ata6285}, @code{ata6286}, @code{ata6289}, @code{ata6612c}, @code{at90pwm1}, @code{at90pwm2}, @code{at90pwm2b}, @code{at90pwm3}, @code{at90pwm3b}, @code{at90pwm81}.
-
-@item avr5
-``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega16}, @code{atmega16a}, @code{atmega16hva}, @code{atmega16hva2}, @code{atmega16hvb}, @code{atmega16hvbrevb}, @code{atmega16m1}, @code{atmega16u4}, @code{atmega161}, @code{atmega162}, @code{atmega163}, @code{atmega164a}, @code{atmega164p}, @code{atmega164pa}, @code{atmega165}, @code{atmega165a}, @code{atmega165p}, @code{atmega165pa}, @code{atmega168}, @code{atmega168a}, @code{atmega168p}, @code{atmega168pa}, @code{atmega168pb}, @code{atmega169}, @code{atmega169a}, @code{atmega169p}, @code{atmega169pa}, @code{atmega32}, @code{atmega32a}, @code{atmega32c1}, @code{atmega32hvb}, @code{atmega32hvbrevb}, @code{atmega32m1}, @code{atmega32u4}, @code{atmega32u6}, @code{atmega323}, @code{atmega324a}, @code{atmega324p}, @code{atmega324pa}, @code{atmega324pb}, @code{atmega325}, @code{atmega325a}, @code{atmega325p}, @code{atmega325pa}, @code{atmega328}, @code{atmega328p}, @code{atmega328pb}, @code{atmega329}, @code{atmega329a}, @code{atmega329p}, @code{atmega329pa}, @code{atmega3250}, @code{atmega3250a}, @code{atmega3250p}, @code{atmega3250pa}, @code{atmega3290}, @code{atmega3290a}, @code{atmega3290p}, @code{atmega3290pa}, @code{atmega406}, @code{atmega64}, @code{atmega64a}, @code{atmega64c1}, @code{atmega64hve}, @code{atmega64hve2}, @code{atmega64m1}, @code{atmega64rfr2}, @code{atmega640}, @code{atmega644}, @code{atmega644a}, @code{atmega644p}, @code{atmega644pa}, @code{atmega644rfr2}, @code{atmega645}, @code{atmega645a}, @code{atmega645p}, @code{atmega649}, @code{atmega649a}, @code{atmega649p}, @code{atmega6450}, @code{atmega6450a}, @code{atmega6450p}, @code{atmega6490}, @code{atmega6490a}, @code{atmega6490p}, @code{ata5795}, @code{ata5790}, @code{ata5790n}, @code{ata5791}, @code{ata6613c}, @code{ata6614q}, @code{ata5782}, @code{ata5831}, @code{ata8210}, @code{ata8510}, @code{ata5702m322}, @code{at90pwm161}, @code{at90pwm216}, @code{at90pwm316}, @code{at90can32}, @code{at90can64}, @code{at90scr100}, @code{at90usb646}, @code{at90usb647}, @code{at94k}, @code{m3000}.
-
-@item avr51
-``Enhanced'' devices with 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega128}, @code{atmega128a}, @code{atmega128rfa1}, @code{atmega128rfr2}, @code{atmega1280}, @code{atmega1281}, @code{atmega1284}, @code{atmega1284p}, @code{atmega1284rfr2}, @code{at90can128}, @code{at90usb1286}, @code{at90usb1287}.
-
-@item avr6
-``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atmega256rfr2}, @code{atmega2560}, @code{atmega2561}, @code{atmega2564rfr2}.
-
-@item avrxmega2
-``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega8e5}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16e5}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c3}, @code{atxmega32c4}, @code{atxmega32d3}, @code{atxmega32d4}, @code{atxmega32e5}, @code{avr64da28}, @code{avr64da32}, @code{avr64da48}, @code{avr64da64}, @code{avr64db28}, @code{avr64db32}, @code{avr64db48}, @code{avr64db64}.
-
-@item avrxmega3
-``XMEGA'' devices with up to 64@tie{}KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
-@*@var{mcu}@tie{}= @code{attiny202}, @code{attiny204}, @code{attiny212}, @code{attiny214}, @code{attiny402}, @code{attiny404}, @code{attiny406}, @code{attiny412}, @code{attiny414}, @code{attiny416}, @code{attiny417}, @code{attiny804}, @code{attiny806}, @code{attiny807}, @code{attiny814}, @code{attiny816}, @code{attiny817}, @code{attiny1604}, @code{attiny1606}, @code{attiny1607}, @code{attiny1614}, @code{attiny1616}, @code{attiny1617}, @code{attiny3214}, @code{attiny3216}, @code{attiny3217}, @code{atmega808}, @code{atmega809}, @code{atmega1608}, @code{atmega1609}, @code{atmega3208}, @code{atmega3209}, @code{atmega4808}, @code{atmega4809}, @code{avr32da28}, @code{avr32da32}, @code{avr32da48}, @code{avr32db28}, @code{avr32db32}, @code{avr32db48}.
-
-@item avrxmega4
-``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega64a3}, @code{atxmega64a3u}, @code{atxmega64a4u}, @code{atxmega64b1}, @code{atxmega64b3}, @code{atxmega64c3}, @code{atxmega64d3}, @code{atxmega64d4}, @code{avr128da28}, @code{avr128da32}, @code{avr128da48}, @code{avr128da64}, @code{avr128db28}, @code{avr128db32}, @code{avr128db48}, @code{avr128db64}.
-
-@item avrxmega5
-``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
-@*@var{mcu}@tie{}= @code{atxmega64a1}, @code{atxmega64a1u}.
-
-@item avrxmega6
-``XMEGA'' devices with more than 128@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega128a3}, @code{atxmega128a3u}, @code{atxmega128b1}, @code{atxmega128b3}, @code{atxmega128c3}, @code{atxmega128d3}, @code{atxmega128d4}, @code{atxmega192a3}, @code{atxmega192a3u}, @code{atxmega192c3}, @code{atxmega192d3}, @code{atxmega256a3}, @code{atxmega256a3b}, @code{atxmega256a3bu}, @code{atxmega256a3u}, @code{atxmega256c3}, @code{atxmega256d3}, @code{atxmega384c3}, @code{atxmega384d3}.
-
-@item avrxmega7
-``XMEGA'' devices with more than 128@tie{}KiB of program memory and more than 64@tie{}KiB of RAM.
-@*@var{mcu}@tie{}= @code{atxmega128a1}, @code{atxmega128a1u}, @code{atxmega128a4u}.
-
-@item avrtiny
-``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{attiny4}, @code{attiny5}, @code{attiny9}, @code{attiny10}, @code{attiny20}, @code{attiny40}.
-
-@item avr1
-This ISA is implemented by the minimal AVR core and supported for assembler only.
-@*@var{mcu}@tie{}= @code{attiny11}, @code{attiny12}, @code{attiny15}, @code{attiny28}, @code{at90s1200}.
-
-@end table

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

* [gcc(refs/users/marxin/heads/sphinx-avr-mmcu)] Convert to RST.
@ 2022-10-19 14:06 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-10-19 14:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:8f2c65262f3e53360e4c8c502da1d6b6ed3d62fb

commit 8f2c65262f3e53360e4c8c502da1d6b6ed3d62fb
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 19 15:56:00 2022 +0200

    Convert to RST.

Diff:
---
 gcc/Makefile.in                                    |  2 +-
 gcc/config/avr/avr-devices.cc                      | 42 +++++++++++-----------
 .../{gen-avr-mmcu-texi.cc => gen-avr-mmcu-rst.cc}  | 33 ++++++++---------
 gcc/config/avr/t-avr                               |  6 ++--
 4 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f672e6ea549..daebf18b253 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3332,7 +3332,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi	\
 	 standards.texi invoke.texi extend.texi md.texi objc.texi	\
 	 gcov.texi trouble.texi bugreport.texi service.texi		\
 	 contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi	\
-	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi	\
+	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.rst \
 	 implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \
 	 lto-dump.texi
 
diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index aa284217f50..15833d91799 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -64,54 +64,54 @@ avr_arch_types[] =
 };
 
 const avr_arch_info_t
-avr_texinfo[] =
+avr_rst[] =
 {
   { ARCH_AVR1,
     "This ISA is implemented by the minimal AVR core and supported "
     "for assembler only." },
   { ARCH_AVR2,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory." },
+    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR25,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory and with "
-    "the @code{MOVW} instruction." },
+    "\"Classic\" devices with up to 8 |nbsp| KiB of program memory and with "
+    "the ``MOVW`` instruction." },
   { ARCH_AVR3,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR31,
-    "``Classic'' devices with 128@tie{}KiB of program memory." },
+    "\"Classic\" devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR35,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
-    "program memory and with the @code{MOVW} instruction." },
+    "\"Classic\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
+    "program memory and with the ``MOVW`` instruction." },
   { ARCH_AVR4,
-    "``Enhanced'' devices with up to 8@tie{}KiB of program memory." },
+    "\"Enhanced\" devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR5,
-    "``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "\"Enhanced\" devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR51,
-    "``Enhanced'' devices with 128@tie{}KiB of program memory." },
+    "\"Enhanced\" devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR6,
-    "``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB "
+    "\"Enhanced\" devices with 3-byte PC, i.e.@: with more than 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRTINY,
-    "``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of "
+    "\"TINY\" Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVRXMEGA2,
-    "``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB "
+    "\"XMEGA\" devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA3,
-    "``XMEGA'' devices with up to 64@tie{}KiB of combined program memory "
+    "\"XMEGA\" devices with up to 64 |nbsp| KiB of combined program memory "
     "and RAM, and with program memory visible in the RAM address space." },
   { ARCH_AVRXMEGA4,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
+    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA5,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
-    "of program memory and more than 64@tie{}KiB of RAM." },
+    "\"XMEGA\" devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
+    "of program memory and more than 64 |nbsp| KiB of RAM." },
   { ARCH_AVRXMEGA6,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory." },
+    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory." },
   { ARCH_AVRXMEGA7,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory "
-    "and more than 64@tie{}KiB of RAM." }
+    "\"XMEGA\" devices with more than 128 |nbsp| KiB of program memory "
+    "and more than 64 |nbsp| KiB of RAM." }
 };
 
 const avr_mcu_t
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-rst.cc
similarity index 80%
rename from gcc/config/avr/gen-avr-mmcu-texi.cc
rename to gcc/config/avr/gen-avr-mmcu-rst.cc
index 0e013e90bd0..19b903c2760 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-rst.cc
@@ -137,11 +137,11 @@ print_mcus (size_t n_mcus)
     
   qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator);
 
-  printf ("@*@var{mcu}@tie{}=");
+  printf ("  :samp:`{mcu}=`");
 
   for (i = 0; i < n_mcus; i++)
     {
-      printf (" @code{%s}%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
+      printf (" ``%s``%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
 
       if (i && !strcmp (mcus[i]->name, mcus[i-1]->name))
 	{
@@ -162,20 +162,18 @@ int main (void)
   size_t i, n_mcus = 0;
   const avr_mcu_t *mcu;
 
-  printf ("@c Copyright (C) 2012-2022 Free Software Foundation, Inc.\n");
-  printf ("@c This is part of the GCC manual.\n");
-  printf ("@c For copying conditions, see the file "
-	  "gcc/doc/include/fdl.texi.\n\n");
+  printf ("..\n");
+  printf ("  Copyright 1988-2022 Free Software Foundation, Inc.\n");
+  printf ("  This is part of the GCC manual.\n");
+  printf ("  For copying conditions, see the copyright.rst file.\n\n");
 
-  printf ("@c This file is generated automatically using\n");
-  printf ("@c gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
-  printf ("@c	 gcc/config/avr/avr-arch.h\n");
-  printf ("@c	 gcc/config/avr/avr-devices.cc\n");
-  printf ("@c	 gcc/config/avr/avr-mcus.def\n\n");
+  printf ("  This file is generated automatically using\n");
+  printf ("  gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
+  printf ("    gcc/config/avr/avr-arch.h\n");
+  printf ("    gcc/config/avr/avr-devices.cc\n");
+  printf ("    gcc/config/avr/avr-mcus.def\n\n");
 
-  printf ("@c Please do not edit manually.\n\n");
-
-  printf ("@table @code\n\n");
+  printf ("  Please do not edit manually.\n\n");
 
   for (mcu = avr_mcu_types; mcu->name; mcu++)
     {
@@ -187,9 +185,9 @@ int main (void)
 	  print_mcus (n_mcus);
 	  n_mcus = 0;
 
-	  for (i = 0; i < ARRAY_SIZE (avr_texinfo); i++)
-	    if (arch_id == avr_texinfo[i].arch_id)
-	      printf ("@item %s\n%s\n", mcu->name, avr_texinfo[i].texinfo);
+	  for (i = 0; i < ARRAY_SIZE (avr_rst); i++)
+	    if (arch_id == avr_rst[i].arch_id)
+	      printf ("``%s``\n  %s\n\n", mcu->name, avr_rst[i].texinfo);
 	}
       else if (arch_id == (enum avr_arch_id) mcu->arch_id)
 	{
@@ -198,7 +196,6 @@ int main (void)
     }
 
   print_mcus (n_mcus);
-  printf ("@end table\n");
 
   return EXIT_SUCCESS;
 }
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index d7b1751b3b6..9c5632a8210 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -78,10 +78,10 @@ AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
 
 .PHONY: avr-mcus
 
-avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
+avr-mcus: $(srcdir)/doc/avr-mmcu.rst ; @true
 
 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
-gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
+gen-avr-mmcu-rst$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-rst.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
   $(srcdir)/config/avr/avr-arch.h
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
@@ -91,7 +91,7 @@ gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
   $(srcdir)/config/avr/avr-arch.h $(TM_H)
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
 
-$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
+$(srcdir)/doc/avr-mmcu.rst: gen-avr-mmcu-rst$(build_exeext)
 	$(RUN_GEN) ./$< > $@
 
 s-device-specs: gen-avr-mmcu-specs$(build_exeext)

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

* [gcc(refs/users/marxin/heads/sphinx-avr-mmcu)] Convert to RST.
@ 2022-10-19 13:58 Martin Liska
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liska @ 2022-10-19 13:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b97039ac93bb903bf7b9abea2571dfd8598990b0

commit b97039ac93bb903bf7b9abea2571dfd8598990b0
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Oct 19 15:56:00 2022 +0200

    Convert to RST.

Diff:
---
 gcc/Makefile.in                                    |  2 +-
 gcc/config/avr/avr-devices.cc                      | 42 +++++++++++-----------
 .../{gen-avr-mmcu-texi.cc => gen-avr-mmcu-rst.cc}  | 33 ++++++++---------
 gcc/config/avr/t-avr                               |  6 ++--
 4 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f672e6ea549..daebf18b253 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3332,7 +3332,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi	\
 	 standards.texi invoke.texi extend.texi md.texi objc.texi	\
 	 gcov.texi trouble.texi bugreport.texi service.texi		\
 	 contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi	\
-	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi	\
+	 fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.rst \
 	 implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \
 	 lto-dump.texi
 
diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc
index aa284217f50..7107e3f0566 100644
--- a/gcc/config/avr/avr-devices.cc
+++ b/gcc/config/avr/avr-devices.cc
@@ -64,54 +64,54 @@ avr_arch_types[] =
 };
 
 const avr_arch_info_t
-avr_texinfo[] =
+avr_rst[] =
 {
   { ARCH_AVR1,
     "This ISA is implemented by the minimal AVR core and supported "
     "for assembler only." },
   { ARCH_AVR2,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory." },
+    "``Classic`` devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR25,
-    "``Classic'' devices with up to 8@tie{}KiB of program memory and with "
-    "the @code{MOVW} instruction." },
+    "``Classic`` devices with up to 8 |nbsp| KiB of program memory and with "
+    "the ``MOVW`` instruction." },
   { ARCH_AVR3,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "``Classic`` devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR31,
-    "``Classic'' devices with 128@tie{}KiB of program memory." },
+    "``Classic`` devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR35,
-    "``Classic'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
-    "program memory and with the @code{MOVW} instruction." },
+    "``Classic`` devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
+    "program memory and with the ``MOVW`` instruction." },
   { ARCH_AVR4,
-    "``Enhanced'' devices with up to 8@tie{}KiB of program memory." },
+    "``Enhanced`` devices with up to 8 |nbsp| KiB of program memory." },
   { ARCH_AVR5,
-    "``Enhanced'' devices with 16@tie{}KiB up to 64@tie{}KiB of "
+    "``Enhanced`` devices with 16 |nbsp| KiB up to 64 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVR51,
-    "``Enhanced'' devices with 128@tie{}KiB of program memory." },
+    "``Enhanced`` devices with 128 |nbsp| KiB of program memory." },
   { ARCH_AVR6,
-    "``Enhanced'' devices with 3-byte PC, i.e.@: with more than 128@tie{}KiB "
+    "``Enhanced`` devices with 3-byte PC, i.e.@: with more than 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRTINY,
-    "``TINY'' Tiny core devices with 512@tie{}B up to 4@tie{}KiB of "
+    "``TINY`` Tiny core devices with 512 |nbsp| B up to 4 |nbsp| KiB of "
     "program memory." },
   { ARCH_AVRXMEGA2,
-    "``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB "
+    "``XMEGA`` devices with more than 8 |nbsp| KiB and up to 64 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA3,
-    "``XMEGA'' devices with up to 64@tie{}KiB of combined program memory "
+    "``XMEGA`` devices with up to 64 |nbsp| KiB of combined program memory "
     "and RAM, and with program memory visible in the RAM address space." },
   { ARCH_AVRXMEGA4,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
+    "``XMEGA`` devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
     "of program memory." },
   { ARCH_AVRXMEGA5,
-    "``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB "
-    "of program memory and more than 64@tie{}KiB of RAM." },
+    "``XMEGA`` devices with more than 64 |nbsp| KiB and up to 128 |nbsp| KiB "
+    "of program memory and more than 64 |nbsp| KiB of RAM." },
   { ARCH_AVRXMEGA6,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory." },
+    "``XMEGA`` devices with more than 128 |nbsp| KiB of program memory." },
   { ARCH_AVRXMEGA7,
-    "``XMEGA'' devices with more than 128@tie{}KiB of program memory "
-    "and more than 64@tie{}KiB of RAM." }
+    "``XMEGA`` devices with more than 128 |nbsp| KiB of program memory "
+    "and more than 64 |nbsp| KiB of RAM." }
 };
 
 const avr_mcu_t
diff --git a/gcc/config/avr/gen-avr-mmcu-texi.cc b/gcc/config/avr/gen-avr-mmcu-rst.cc
similarity index 80%
rename from gcc/config/avr/gen-avr-mmcu-texi.cc
rename to gcc/config/avr/gen-avr-mmcu-rst.cc
index 0e013e90bd0..19b903c2760 100644
--- a/gcc/config/avr/gen-avr-mmcu-texi.cc
+++ b/gcc/config/avr/gen-avr-mmcu-rst.cc
@@ -137,11 +137,11 @@ print_mcus (size_t n_mcus)
     
   qsort (mcus, n_mcus, sizeof (avr_mcu_t*), comparator);
 
-  printf ("@*@var{mcu}@tie{}=");
+  printf ("  :samp:`{mcu}=`");
 
   for (i = 0; i < n_mcus; i++)
     {
-      printf (" @code{%s}%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
+      printf (" ``%s``%s", mcus[i]->name, i == n_mcus-1 ? ".\n\n" : ",");
 
       if (i && !strcmp (mcus[i]->name, mcus[i-1]->name))
 	{
@@ -162,20 +162,18 @@ int main (void)
   size_t i, n_mcus = 0;
   const avr_mcu_t *mcu;
 
-  printf ("@c Copyright (C) 2012-2022 Free Software Foundation, Inc.\n");
-  printf ("@c This is part of the GCC manual.\n");
-  printf ("@c For copying conditions, see the file "
-	  "gcc/doc/include/fdl.texi.\n\n");
+  printf ("..\n");
+  printf ("  Copyright 1988-2022 Free Software Foundation, Inc.\n");
+  printf ("  This is part of the GCC manual.\n");
+  printf ("  For copying conditions, see the copyright.rst file.\n\n");
 
-  printf ("@c This file is generated automatically using\n");
-  printf ("@c gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
-  printf ("@c	 gcc/config/avr/avr-arch.h\n");
-  printf ("@c	 gcc/config/avr/avr-devices.cc\n");
-  printf ("@c	 gcc/config/avr/avr-mcus.def\n\n");
+  printf ("  This file is generated automatically using\n");
+  printf ("  gcc/config/avr/gen-avr-mmcu-texi.cc from:\n");
+  printf ("    gcc/config/avr/avr-arch.h\n");
+  printf ("    gcc/config/avr/avr-devices.cc\n");
+  printf ("    gcc/config/avr/avr-mcus.def\n\n");
 
-  printf ("@c Please do not edit manually.\n\n");
-
-  printf ("@table @code\n\n");
+  printf ("  Please do not edit manually.\n\n");
 
   for (mcu = avr_mcu_types; mcu->name; mcu++)
     {
@@ -187,9 +185,9 @@ int main (void)
 	  print_mcus (n_mcus);
 	  n_mcus = 0;
 
-	  for (i = 0; i < ARRAY_SIZE (avr_texinfo); i++)
-	    if (arch_id == avr_texinfo[i].arch_id)
-	      printf ("@item %s\n%s\n", mcu->name, avr_texinfo[i].texinfo);
+	  for (i = 0; i < ARRAY_SIZE (avr_rst); i++)
+	    if (arch_id == avr_rst[i].arch_id)
+	      printf ("``%s``\n  %s\n\n", mcu->name, avr_rst[i].texinfo);
 	}
       else if (arch_id == (enum avr_arch_id) mcu->arch_id)
 	{
@@ -198,7 +196,6 @@ int main (void)
     }
 
   print_mcus (n_mcus);
-  printf ("@end table\n");
 
   return EXIT_SUCCESS;
 }
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index d7b1751b3b6..9c5632a8210 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -78,10 +78,10 @@ AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
 
 .PHONY: avr-mcus
 
-avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
+avr-mcus: $(srcdir)/doc/avr-mmcu.rst ; @true
 
 # Make sure that native -mmcu= support is in sync with -mmcu= documentation.
-gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
+gen-avr-mmcu-rst$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-rst.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
   $(srcdir)/config/avr/avr-arch.h
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
@@ -91,7 +91,7 @@ gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
   $(srcdir)/config/avr/avr-arch.h $(TM_H)
 	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES)
 
-$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
+$(srcdir)/doc/avr-mmcu.rst: gen-avr-mmcu-rst$(build_exeext)
 	$(RUN_GEN) ./$< > $@
 
 s-device-specs: gen-avr-mmcu-specs$(build_exeext)

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

end of thread, other threads:[~2022-10-20 12:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20 12:03 [gcc(refs/users/marxin/heads/sphinx-avr-mmcu)] Convert to RST Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2022-10-20 11:47 Martin Liska
2022-10-19 14:06 Martin Liska
2022-10-19 13:58 Martin Liska

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).