public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Georg-Johann Lay <gjl@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-9082] AVR: extend.texi - Use @defbuiltin to document built-ins.
Date: Tue, 20 Feb 2024 12:59:52 +0000 (GMT)	[thread overview]
Message-ID: <20240220125952.5AD2A3858D20@sourceware.org> (raw)

https://gcc.gnu.org/g:39ff13375dd2a79fe6af76d82636e8503513a099

commit r14-9082-g39ff13375dd2a79fe6af76d82636e8503513a099
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Tue Feb 20 13:46:30 2024 +0100

    AVR: extend.texi - Use @defbuiltin to document built-ins.
    
    gcc/
            * doc/extend.texi (AVR Built-in Functions): Use @defbuiltin
            instead of @table.

Diff:
---
 gcc/doc/extend.texi | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e048404dffe5..b2383b556668 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -16782,37 +16782,41 @@ or if not a specific built-in is implemented or not. For example, if
 @code{__builtin_avr_nop} is available the macro
 @code{__BUILTIN_AVR_NOP} is defined to @code{1} and undefined otherwise.
 
-@table @code
+@defbuiltin{void __builtin_avr_nop (void)}
+@defbuiltinx{void __builtin_avr_nop (void)}
+@defbuiltinx{void __builtin_avr_sei (void)}
+@defbuiltinx{void __builtin_avr_cli (void)}
+@defbuiltinx{void __builtin_avr_sleep (void)}
+@defbuiltinx{void __builtin_avr_wdr (void)}
+@defbuiltinx{{unsigned char} __builtin_avr_swap (unsigned char)}
+@defbuiltinx{{unsigned int} __builtin_avr_fmul (unsigned char, unsigned char)}
+@defbuiltinx{int __builtin_avr_fmuls (char, char)}
+@defbuiltinx{int __builtin_avr_fmulsu (char, unsigned char)}
 
-@item void __builtin_avr_nop (void)
-@itemx void __builtin_avr_sei (void)
-@itemx void __builtin_avr_cli (void)
-@itemx void __builtin_avr_sleep (void)
-@itemx void __builtin_avr_wdr (void)
-@itemx unsigned char __builtin_avr_swap (unsigned char)
-@itemx unsigned int __builtin_avr_fmul (unsigned char, unsigned char)
-@itemx int __builtin_avr_fmuls (char, char)
-@itemx int __builtin_avr_fmulsu (char, unsigned char)
 These built-in functions map to the respective machine
 instruction, i.e.@: @code{nop}, @code{sei}, @code{cli}, @code{sleep},
 @code{wdr}, @code{swap}, @code{fmul}, @code{fmuls}
 resp. @code{fmulsu}. The three @code{fmul*} built-ins are implemented
 as library call if no hardware multiplier is available.
 
-@item void __builtin_avr_delay_cycles (unsigned long ticks)
+@enddefbuiltin
+
+@defbuiltin{void __builtin_avr_delay_cycles (unsigned long @var{ticks})}
 Delay execution for @var{ticks} cycles. Note that this
 built-in does not take into account the effect of interrupts that
 might increase delay time. @var{ticks} must be a compile-time
 integer constant; delays with a variable number of cycles are not supported.
+@enddefbuiltin
 
-@item char __builtin_avr_flash_segment (const __memx void*)
+@defbuiltin{char __builtin_avr_flash_segment (const __memx void*)}
 This built-in takes a byte address to the 24-bit
 @ref{AVR Named Address Spaces,address space} @code{__memx} and returns
 the number of the flash segment (the 64 KiB chunk) where the address
 points to.  Counting starts at @code{0}.
 If the address does not point to flash memory, return @code{-1}.
+@enddefbuiltin
 
-@item uint8_t __builtin_avr_insert_bits (uint32_t map, uint8_t bits, uint8_t val)
+@defbuiltin{uint8_t __builtin_avr_insert_bits (uint32_t @var{map}, uint8_t @var{bits}, uint8_t @var{val})}
 Insert bits from @var{bits} into @var{val} and return the resulting
 value. The nibbles of @var{map} determine how the insertion is
 performed: Let @var{X} be the @var{n}-th nibble of @var{map}
@@ -16856,12 +16860,12 @@ __builtin_avr_insert_bits (0xffff3210, bits, val);
 // reverse the bit order of bits
 __builtin_avr_insert_bits (0x01234567, bits, 0);
 @end smallexample
+@enddefbuiltin
 
-@item void __builtin_avr_nops (unsigned count)
+@defbuiltin{void __builtin_avr_nops (unsigned @var{count})}
 Insert @var{count} @code{NOP} instructions.
 The number of instructions must be a compile-time integer constant.
-
-@end table
+@enddefbuiltin
 
 @noindent
 There are many more AVR-specific built-in functions that are used to

                 reply	other threads:[~2024-02-20 12:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220125952.5AD2A3858D20@sourceware.org \
    --to=gjl@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).